How to loop code back to start if user wants to play again?
I need help with a quiz that i made in which three questions are asked until they get it right and their time is recorded.I want to add at the end of the quiz,an option to play again but i don't fully understand how to use for or while loops for this.
What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. Digital Marketing Agency For Small Businesses
Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information.
beli no 4d online
The content is utmost interesting! I have completely enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great, and your efforts are outstanding! junk car removal abbotsford
I'm really happy to find this site and did enjoy reading useful articles posted here. The ideas of the author was awesome, thanks for the share.sa gaming
We are ready to provide the best service for online lottery players at Gotogel.com . From livechat and whatsapp services 24 hours as well as a safe and easy transaction process. To improve the quality of service, we welcome all criticism, suggestions, and input from you. We guarantee 100% confidentiality of your personal data.Go Togel
The most important part here is to find a eat-and-run verification site that can do it. Even though the eat-and-run verification site has been saturated for a long time, there are still a handful of eat-and-eat verification sites that can properly verify the food and drink. 먹튀검증커뮤니티
you could try putting the code in a loop that runs only if a certain value is there, for example:
again = 1 for i in range(again) # your code # outside of the loop code at the end again2 = int(input("Do you want to play again? Yes=1 No=2 ") if again2 = 1 again = 1 print("Lets go again!") else: again = 0 print("Goodbye for now!")
@IbrahimFromHVS First of all you should put all three questions in one if __name__ == "__main__"
statement. Second you can do this to loop the questions if the player wants to play again:
play_again = "yes" while play_again == "yes": # Your Quiz Statements ... # This will prompt the user to ask them if they want to play again # If yes then the loop will repeat else it will break out print ("Do You want to Play Again?") play_again = input("Yes or No: ").lower()
Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. HİNDİSTAN GİRİŞ VİZESİ