0

How can I send back the player to the first question when the answer is wrong? (python)

print("Welcome") begin = input ("Would you like to begin (yes or no) ? : ") if begin == "yes": print("") print("Awesome, enjoy the quiz! Lets begin, Question 1 : ") ----------------------------------------------- If the person says : "no", how can I make it so that it sends him back to begin without going onto the next question?

22nd May 2018, 1:04 AM
Nathan Naouri
Nathan Naouri - avatar
1 Respuesta
+ 3
You could probably make something like: def start(): print("This is the start of the quiz.") start() print("Question 1") ... if question == wrong: start() This is all psuedo code as I don't really know any Python but you get the point.
22nd May 2018, 2:35 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar