/Guessing_game

Guessing game with python

Primary LanguagePython

Guessing Game

The Guessing Game is a simple Python program where the user tries to guess a randomly generated number. The program provides feedback ("higher" or "lower") to guide the user in making subsequent guesses until they correctly guess the number or run out of tries.

How to Play

Run the Python program guessing_game.py. The program will generate a random number between 1 and 10 (inclusive). Enter your guess when prompted with the message "Enter your guess:". The program will provide feedback based on your guess: If your guess is higher than the generated number, it will display "Lower :(". If your guess is lower than the generated number, it will display "Higher :(". If your guess is correct, it will display "You did it ;)" and end the game. You have a limited number of tries to guess the correct number. The number of remaining tries will be displayed after each guess. If you run out of tries without guessing the correct number, the program will display "Out of tries. The number was [correct number].". After the game ends, you will be asked if you want to play again. Respond with "yes" to play another round or "no" to exit the program.

Requirements

Python 3.x

Usage

Clone or download the repository to your local machine. Open a terminal or command prompt and navigate to the project directory. Run the command python guessing_game.py to start the game. Contributing Contributions to the Guessing Game project are welcome! If you find any bugs, have suggestions for improvements, or want to add new features, please feel free to submit a pull request.