A console-based number guessing game written in Python.
This is my first more complex Python exercise, focused on control flow, input validation, and game logic.
🕹️ Game Description -> Guess the number
The player must guess a randomly generated number within a limited number of attempts.
- Difficulty selection:
- Easy (1–20)
- Medium (1–50)
- Hard (1–100)
- Maximum 5 attempts per game
- Input validation (non-numeric and out-of-range inputs)
- Troll protection (game exits after 3 invalid inputs)
- Feedback after each guess:
- Too high / Too low
- Shows the closest guessed number if the player loses
- Option to play again (up to 3 games per run)
whileloops and flow control- Input validation and error handling
- Using flags
- Working with lists
- Conditional logic
- Resetting game state correctly
- Thinking about edge cases