A simple number guessing game implemented in Python.
The Number Guessing Game is a fun and interactive game where the player tries to guess a randomly generated secret number within a given range. The program provides feedback on whether the guess is too high or too low, helping the player to narrow down their guesses until they find the correct number.
- Generates a random secret number between 1 and 100.
- Prompts the player to input their guess.
- Provides feedback on whether the guess is too low or too high.
- Tracks the number of attempts made by the player.
- Congratulates the player upon guessing the correct number and displays the number of attempts.
- Make sure you have Python installed on your system.
- Clone this repository or download the
number_guessing_game.py
file. - Open a terminal or command prompt and navigate to the directory where the file is located.
- Run the game by executing the following command:
- Follow the on-screen instructions and enter your guesses to try and find the secret number.
- Keep guessing until you find the correct number, and the program will display the number of attempts made.
This project is licensed under the MIT License.
Feel free to modify and enhance the code as per your needs.
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.
This project is inspired by the classic number guessing game.