Skip to content

Commit 0e9da34

Browse files
Number guess game Readme
1 parent aee8d92 commit 0e9da34

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Number-Guess-Game/Readme.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Number Guessing Game
2+
3+
This is a simple number guessing game implemented in Python. The program generates a random number between 0 and the user-specified range and challenges the player to guess the correct number.
4+
5+
## Getting Started
6+
7+
To run the game, you'll need Python 3.x installed on your computer. If you don't have Python installed, you can download it from the official website: [Python.org](https://www.python.org/downloads/).
8+
9+
### How to Play
10+
11+
1. Clone or download this repository to your local machine.
12+
2. Open a terminal or command prompt and navigate to the project directory.
13+
3. Run the `number_guessing_game.py` script using the following command:
14+
15+
```bash
16+
python number_guessing_game.py
17+
```
18+
19+
4. The program will ask you to input a range (a positive integer greater than 0) to generate a random number.
20+
5. After specifying the range, the program will generate a random number.
21+
6. You need to make guesses to find the correct number.
22+
7. The program will provide hints if your guess is above or below the generated number.
23+
8. Keep guessing until you find the correct number.
24+
9. The game will display the number of guesses it took to find the correct number.
25+
26+
### Example Gameplay
27+
28+
```
29+
Type a number: 100
30+
Make a guess: 50
31+
You were below the number!
32+
Make a guess: 75
33+
You were below the number!
34+
Make a guess: 90
35+
You were above the number!
36+
Make a guess: 85
37+
You were below the number!
38+
Make a guess: 88
39+
You got it!
40+
You got it in 5 guesses
41+
```
42+
43+
Feel free to contribute or make suggestions for improvements. Happy coding!

0 commit comments

Comments
 (0)