Python - While Loop
You want to repeatedly prompt a user for input until they type 'exit'. Which loop type is most appropriate and why?
while loop runs while a condition is true, ideal for unknown iterations.for loops require known iteration counts; Python lacks native do-while.while loop, because the number of inputs is unknown beforehand -> Option B15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions