This project is a simple number guessing game written in Python. The program randomly selects a number between 1 and 100, and the player has to guess the number. The program provides feedback on whether the guess is too high or too low until the correct number is guessed.
The game generates a random number between 1 and 100 and allows the user to guess the number. After each guess, the program informs the user if their guess is too high, too low, or correct. The game continues until the user guesses the correct number, and it displays the number of attempts taken.
To run this script, you need to have Python installed on your system. Here are some useful bash commands:
- Check Python Version:
python --version
- Install Python (if not already installed):
sudo apt-get update
sudo apt-get install python3
No external Python modules are required for this project. The script uses the built-in random module. Make sure you have Python installed on your system as shown in the commands above.
- Clone the Repository:
git clone https://github.com/ShravanDalavi/Simple-Python-Mini-Projects.git
- Navigate to Directory:
cd Simple-Python-Mini-Projects/Number\ Guessing\ Game
- Run the Script:
python number_guessing.py