seungjae02 / Guess-The-Number-Python

The game asks the user if the user wants to play a game of "Guess the Number." If the user indicates yes, the game will ask the user to input any number between 0 and 20. If the user indicates no, then the game quits. Once the user inputs a number, it will check if the input is valid or invalid by using a try and except filter. If it is valid, it goes through a while loop which contains several if statements. These assort of if statements indicate to the user a general idea of how close they are to the correct number. It uses less than or greater than domains to check how close the number is to the correct number. Also, if the user guesses the same number twice, the game indicates to the user that the number has already been guessed. Once the user guesses the correct number, the game congratulates the user and prompts if the user would like to play the game again. If the user indicates yes, the game clears the list of guess numbers, picks a new random number and replays the game. If the user indicates no, the game quits the code and leaves a nice message: "Thanks for playing!"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guess-The-Number-Python

Classic game of guess the number

About

The game asks the user if the user wants to play a game of "Guess the Number." If the user indicates yes, the game will ask the user to input any number between 0 and 20. If the user indicates no, then the game quits. Once the user inputs a number, it will check if the input is valid or invalid by using a try and except filter. If it is valid, it goes through a while loop which contains several if statements. These assort of if statements indicate to the user a general idea of how close they are to the correct number. It uses less than or greater than domains to check how close the number is to the correct number. Also, if the user guesses the same number twice, the game indicates to the user that the number has already been guessed. Once the user guesses the correct number, the game congratulates the user and prompts if the user would like to play the game again. If the user indicates yes, the game clears the list of guess numbers, picks a new random number and replays the game. If the user indicates no, the game quits the code and leaves a nice message: "Thanks for playing!"


Languages

Language:Python 100.0%