Answer to Question #41696 in Python for Random

Question #41696
How do you keep looping a question till the correct answer is inputted
1
Expert's answer
2014-05-05T14:31:22-0400
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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal