I have this word un-scrambler game that just runs in CMD or the python shell. When the user either guesses the word correctly or incorrectly it says “press any key to play again”
How would I get it to start again?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t have the program exit after evaluating input from the user; instead, do this in a loop. For example, a simple example that doesn’t even use a function:
This outputs the following, with my user input shown as well:
This is obviously quite simple, but the logic sounds like what you’re after. A slightly more complex version of which, with defined functions for you to see where your logic would fit in, could be like this:
The output is identical.