https://github.com/umerjamshaid/banoqabil-2.0-python-course
Number Guessing Game Overview: This repository contains a simple Number Guessing Game implemented in Python. The game generates a random number between 1 and 100, and the user is prompted to guess the correct number. The script provides feedback on whether the guess is too low or too high and congratulates the user upon a correct guess.
https://github.com/umerjamshaid/banoqabil-2.0-python-course
by game game-development number-guessing-game python
Last synced: 4 months ago
JSON representation
Number Guessing Game Overview: This repository contains a simple Number Guessing Game implemented in Python. The game generates a random number between 1 and 100, and the user is prompted to guess the correct number. The script provides feedback on whether the guess is too low or too high and congratulates the user upon a correct guess.
- Host: GitHub
- URL: https://github.com/umerjamshaid/banoqabil-2.0-python-course
- Owner: Umerjamshaid
- Created: 2024-01-31T10:04:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-07T15:54:58.000Z (over 1 year ago)
- Last Synced: 2025-01-21T19:15:24.380Z (6 months ago)
- Topics: by, game, game-development, number-guessing-game, python
- Language: Python
- Homepage: https://github.com/Umerjamshaid/BanoQabil-2.0-Python-Course.git
- Size: 1010 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Number Guessing Game
## Problem Statement
Create a simple Number Guessing Game in Python.
## Code Structure
The Python script `Number_Guessing_Game.py` contains a function `start_game` that initiates the Number Guessing Game. The game generates a random number between 1 and 100, and the user is prompted to guess the correct number. The script provides feedback on whether the guess is too low or too high and congratulates the user upon a correct guess.
## How to Run
1. Ensure you have Python installed on your machine.
2. Open a terminal or command prompt.
3. Navigate to the directory containing `Number_Guessing_Game.py`.
4. Run the script using the command: `python Number_Guessing_Game.py`.## Example Output
Welcome to the Number Guessing Game!
I'm thinking of a number between 1 and 100. Can you guess it?Enter your guess: 50
Too low. Try again.Enter your guess: 75
Too high. Try again.Enter your guess: 60
Congratulations! You guessed the correct number 60 in 3 attempts.