This is a simple Python-based number guessing game where the player attempts to guess a randomly generated number within a limited number of attempts.
The project is designed as a beginner-friendly application to demonstrate core programming concepts such as loops, conditional logic, and user interaction.
- Generates a secret number between 1 and 100
- Provides limited attempts (default = 5)
- Gives feedback if the guess is:
- Too low
- Too high
Ends when:
- The correct number is guessed
- All attempts are used
https://github.com/NmaCharis/Guessing-game/blob/main/game.py
- Clone or download this repository
- Open your terminal or command prompt
- Run the program:
bash python Game.py
Welcome to the Number Guessing Game! You have 5 attempts to guess the correct number.
Enter your guess: 20 Too low!
Enter your guess: 75 Too high!
Enter your guess: 50 Correct! You guessed the number.
Learning Objectives
This project helps in understanding:
Using while loops in Python Handling user input with input() Applying conditional statements (if, elif, else) Building simple interactive command-line applications Technologies Used Python
Author
Chidinma Charity Igwe
License
This project is licensed under the MIT License.