Skip to content

QayoomS/Guessing-Game-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Number Guessing Game (Python)

A simple command-line Number Guessing Game built in Python. The program randomly selects a number between 1 and 5, and the player has three chances to guess it correctly.

How to Play

Run the script in your terminal or IDE.

You’ll be greeted with a welcome message.

Guess an integer between 1 and 5.

You have 3 attempts. If your guess matches the random number, you win!

If you run out of guesses, the game ends, and you can restart to play again.

Example

Welcome to the number guessing game Guesses Left: 3 Guess an integer between 1 and 5: 4 Better Luck next time! Guesses Left: 2 Guess an integer between 1 and 5: 3 congratulations, you win! the game is over. Restart the program to play again!

Requirements

Python 3.x

Run the game:

python guessing_game.py

License

This project is open-source and available under the MIT License.

Credit: University of Galway Foundamental of Python notes.

About

Code an Easy number guessing game with Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages