https://github.com/mirayatech/py-guessing-game
A simple number guessing game
https://github.com/mirayatech/py-guessing-game
game guessing-game python
Last synced: 2 months ago
JSON representation
A simple number guessing game
- Host: GitHub
- URL: https://github.com/mirayatech/py-guessing-game
- Owner: mirayatech
- Created: 2023-11-12T11:11:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-12T14:36:30.000Z (over 2 years ago)
- Last Synced: 2025-06-19T03:40:18.253Z (about 1 year ago)
- Topics: game, guessing-game, python
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 🎲 Number Guessing Game
This is a Python script for a simple number guessing game. You guess a number between 1 and 10, and the computer tells you if your guess is too high, too low, or correct.
## 🌟 What I Learned
- **Loops (`while` loop):** How to keep the game going until the right number is guessed.
- **Conditional Statements (`if`, `elif`, `else`):** How to check if the guess is correct, too high, or too low.
- **Python's `random` Library:** To make the game interesting by having the computer pick a random number every time.
- **Input and Output:** Getting the player's guess and showing messages.
## 🚀 How to Play
1. Run the `guess_the_number.py` script in Python.
2. The game will ask you to guess a number between 1 and 10.
3. Type your guess and press Enter.
4. The game tells you if your guess is right, too high, or too low. Keep guessing until you get it right.
5. When you guess right, you can choose to play again or stop.
## 🔍 Known Issues
- The game does not check if you put in something that's not a number. If you do, it might stop working.
## 🛫 Try It Yourself
1. Download the `guess_the_number.py` file.
2. Open it in a Python program like IDLE.
3. Run the script and start guessing!
4. See how the game works and have fun.