https://github.com/danpoynor/python-number-guessing-game-with-stats
A number guessing game written in Python 3 that presents median, mode, and mean statistics
https://github.com/danpoynor/python-number-guessing-game-with-stats
console-game data-analysis number-guessing-game python3 statistics
Last synced: 28 days ago
JSON representation
A number guessing game written in Python 3 that presents median, mode, and mean statistics
- Host: GitHub
- URL: https://github.com/danpoynor/python-number-guessing-game-with-stats
- Owner: danpoynor
- Created: 2022-08-16T18:06:08.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-17T22:36:20.000Z (almost 4 years ago)
- Last Synced: 2025-01-17T02:11:50.482Z (over 1 year ago)
- Topics: console-game, data-analysis, number-guessing-game, python3, statistics
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Number Guessing Game With Stats
A number guessing game written in Python 3.
## Run the app
```bash
python3 app.py
```
NOTE: Python 3.10 was used to develop and test this app.
---
## Features
- Welcome text header appears when first run
- Player can pick numbers between 1 and 100
- Non-number guesses are handled with a `ValueError` exception
- Player is informed if their number is outside the range 1-100
- Message appears to let user know the answer is higher or lower than their guess
- After each game ends, the number of attempts at guessing is saved to a list
- After each game ends, the player is shown:
- Number of attempts at guessing
- Mean of the saved attempts list
- Median of the saved attempts list
- Mode of the saved attempts list
- At the start of each game, the player is shown the current best score (least amount of points) so that they know what they're am supposed to beat.
- User can choose to play again after game is over
- When the game ends, an ending message is shown to the player.
---
## Screenshot Gameplay Example
