MATLAB: Following True or False

MATLABwhile loop

Consider the following example. a and b are two random variables. The loop will exit if and only if a+b=1. Is it true or false?
a=rand;
b=rand;
while(a+b == 1)
a=rand;
b=rand;
end

Best Answer

While executes as long as the given condition is true, so the loop would only execute as long as the sum was 1.