Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anurag1101/the_perfect_guess
Perfect Guess is a simple number guessing game built with Python. Players try to guess a randomly generated number between 1 and 100, receiving feedback on whether their guesses are too high or too low. The game continues until the correct number is guessed, with an option to play again. Enjoy testing your guessing skills!
https://github.com/anurag1101/the_perfect_guess
functional-programming functions-python game-development guessing-number-game if-elif-else python python3
Last synced: about 9 hours ago
JSON representation
Perfect Guess is a simple number guessing game built with Python. Players try to guess a randomly generated number between 1 and 100, receiving feedback on whether their guesses are too high or too low. The game continues until the correct number is guessed, with an option to play again. Enjoy testing your guessing skills!
- Host: GitHub
- URL: https://github.com/anurag1101/the_perfect_guess
- Owner: Anurag1101
- Created: 2024-10-08T13:59:35.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-11-07T06:31:56.000Z (8 days ago)
- Last Synced: 2024-11-07T07:25:47.398Z (8 days ago)
- Topics: functional-programming, functions-python, game-development, guessing-number-game, if-elif-else, python, python3
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Perfect Guess
Welcome to the **Perfect Guess** game! This is a simple and fun number guessing game built using Python. The objective of the game is for the player to guess a randomly generated number within a specified range.
## Table of Contents
- [Introduction](#introduction)
- [How to Play](#how-to-play)
- [Game Logic](#game-logic)
- [Installation](#installation)
- [Usage](#usage)
- [Features](#features)
- [License](#license)
- [Acknowledgments](#acknowledgments)## Introduction
The Perfect Guess game generates a random number between 1 and 100, and the player has to guess that number. The game provides feedback after each guess, indicating whether the guess is too high or too low. Once the correct number is guessed, the player is given the option to play again.
## How to Play
1. Run the game script.
2. When prompted, enter your guess for the number.
3. Follow the prompts based on whether your guess is higher or lower than the generated number.
4. Keep guessing until you find the correct number.
5. After a correct guess, decide if you want to play again or exit the game.## Game Logic
The main components of the game logic include:
- **Random Number Generation**: The game uses Python's `random` library to generate a number between 1 and 100.
- **Guessing Loop**: A loop continues until the player guesses the correct number or chooses to stop playing.
- **Feedback System**: After each guess, the game provides feedback:
- If the guess is too high, the player is prompted to guess lower.
- If the guess is too low, the player is prompted to guess higher.- **Replay Option**: After a successful guess, the player can choose to play again or exit.
**Features:**
- Random number generation for varied gameplay.
- User-friendly prompts and feedback.
- Option to play multiple rounds.
- Simple and easy-to-understand code structure.
## Installation
To run the Perfect Guess game, ensure you have Python installed on your system. You can download Python from [python.org](https://www.python.org/downloads/).
Once Python is installed, you can clone this repository using the following command:
git clone https://github.com/Anurag1101/perfectguess.git
Navigate to the project directory: cd perfectguess
## Acknowledgments:
Thanks to the Python community for their invaluable resources and support.
Inspiration drawn from classic number guessing games.
## License:
This project is licensed under the `MIT License`. See the LICENSE file for details.