Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pratikpaudel/digit_detective
Number Hunt: Guess right, win the game! Are you up for the challenge?
https://github.com/pratikpaudel/digit_detective
Last synced: 30 days ago
JSON representation
Number Hunt: Guess right, win the game! Are you up for the challenge?
- Host: GitHub
- URL: https://github.com/pratikpaudel/digit_detective
- Owner: PratikPaudel
- Created: 2023-09-12T05:48:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-12T06:04:17.000Z (over 1 year ago)
- Last Synced: 2023-09-12T13:18:38.929Z (over 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Digit_Detective
Number Hunt: Guess right, win the game! Are you up for the challenge?Digit Detective Number Guessing Game
OverviewDigit Detective is a Python-based number guessing game where the player tries to uncover a randomly generated secret number between 1 and 100. This engaging game challenges the player's deductive skills in a fun and interactive way.
How to PlayRun the Python script digit_detective.py.
The game will generate a random number between 1 and 100.
The player is prompted to input their guess or type 'quit' to exit the game.
After each guess, the game provides feedback on whether the guess is too low or too high.
The game continues until the player correctly guesses the random number or decides to quit.
When the game ends, it displays the number of attempts made and all the guessed numbers during the game.Features
Interactive user interface.
Randomly generated secret number.
Real-time feedback on each guess.
Option to quit the game at any time.
Keeps track of guessed numbers and the number of attempts.
Calculates and displays the average number of guesses per game upon exit.Usage
Ensure you have Python installed on your system.
Run the script using a Python interpreter: python digit_detective.py.Example
```python
Take a guess between 1-100 (type 'quit' to exit): 50
Your guess is too low.
Take a guess between 1-100 (type 'quit' to exit): 75
Your guess is too high.
Take a guess between 1-100 (type 'quit' to exit): 65
Your guess is too low.
Take a guess between 1-100 (type 'quit' to exit): 70
Your guess is too high.
Take a guess between 1-100 (type 'quit' to exit): 68
Your guess is too high.
Take a guess between 1-100 (type 'quit' to exit): 66
You guessed it! The number was 66. You guessed it in 6 attempts.
Your guessed numbers: [50, 75, 65, 70, 68, 66]
Do you want to play again? (yes/no): no
Thanks for playing Digit Detective!
Your guessed numbers: [50, 75, 65, 70, 68, 66]
Average guesses per game: 6.00Enjoy the Game!
Feel free to modify and enhance the code to suit your preferences. Have fun playing the Digit Detective Number Guessing Game!