An open API service indexing awesome lists of open source software.

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.

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.