Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8220599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:34:46+00:00 2026-06-07T13:34:46+00:00

I have this word un-scrambler game that just runs in CMD or the python

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:34:49+00:00Added an answer on June 7, 2026 at 1:34 pm

    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:

    phrase = "hello, world"
    
    while input("Guess the phrase: ") != phrase:
        print("Incorrect.")  # Evaluate the input here
    print("Correct")  # If the user is successful
    

    This outputs the following, with my user input shown as well:

    Guess the phrase: a guess
    Incorrect.
    Guess the phrase: another guess
    Incorrect.
    Guess the phrase: hello, world
    Correct
    

    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:

    def game(phrase_to_guess):
        return input("Guess the phrase: ") == phrase_to_guess
    
    def main():
        phrase = "hello, world"
        while not game(phrase):
            print("Incorrect.")
        print("Correct")
    
    main()
    

    The output is identical.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not sure how to really word this, but I have a game
I have a Model that named word. this is my word model public class
I have a struct that I initialize like this: typedef struct { word w;
I have this code that determines whether a word (ignoring case) is included in
I have a table that looks something like this: word big expensive smart fast
We have this string: according to posts #4,#5 and #6 the word... I want
I have this XML document <xml> <word> <threeletter>rip</threeletter> <fourletter>Pier</fourletter> <fiveletter>Spire</fiveletter> <sixletter>Spider</sixletter> </word> <word> <threeletter>rip</threeletter>
I have a table of 2 fields. Word and timestamp. Then i have this
I have created this function to check abecedarian with while loop (A word is
Sorry guys, didn't know how to word this one. Still learning jquery and have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.