A simple yet engaging Python-based number guessing game where players guess a secret number between 1 and 100. Choose your difficulty level, get hints, and track your wins and losses!
- 3 Difficulty Levels: Easy (10 chances), Medium (5 chances), Hard (3 chances).
- Smart Hints: Tells you if your guess is too high or too low.
- Win/Loss Tracking: Keeps track of your performance across rounds.
- Replayability: Play as many rounds as you want!
- User-Friendly: Clear instructions and input validation for a smooth experience.
- Python 3.x
- Clone the repository:
git clone https://github.com/Said-BT/python-cli-number-guessing-game
- Navigate to the project directory:
cd python-cli-number-guessing-game - Run the game:
python main.py
- Choose Difficulty: Select Easy, Medium, or Hard.
- Guess the Number: Enter a number between 1 and 100.
- Get Feedback: After each guess, the game tells you if the secret number is higher or lower.
- Win or Lose: Guess correctly before running out of attempts, or try again!
- Replay: After each round, choose to play again or exit.
Welcome to the Number Guessing Game!
I will think of a number between 1 and 100.
Difficulty Levels:
1. Easy (10 chances)
2. Medium (5 chances)
3. Hard (3 chances)
Enter your difficulty level choice: 2
Great! You have selected the Medium difficulty level.
You have 5 chances to guess the number.
Enter your guess: 50
Too high!
Enter your guess: 25
Too low!
Enter your guess: 37
๐ Correct! You won in 3 attempt(s)!- Developed by Said B as part of learning Python.
- Feedback or contributions? Open an issue or submit a pull request!
- Practicing from: https://roadmap.sh/projects/number-guessing-game