77 895
Assignments Done
Successfully Done
In August 2019

Answer to Question #41696 in Python for Random

Question #41696
How do you keep looping a question till the correct answer is inputted
Expert's answer
whileTrue:         #infinite loop
answer = input("Question? ").lower()
if answer == 'correct':

break #break when answer is correct

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions