Amazing-Python-Scripts

Форк
0

Readme.md

Number Guessing Game

This is a simple number guessing game implemented in Python. The program generates a random number between 0 and the user-specified range and challenges the player to guess the correct number.

Getting Started

To run the game, you'll need Python 3.x installed on your computer. If you don't have Python installed, you can download it from the official website: Python.org.

How to Play

  1. Clone or download this repository to your local machine.
  2. Open a terminal or command prompt and navigate to the project directory.
  3. Run the number_guessing_game.py script using the following command:
python number_guessing_game.py
  1. The program will ask you to input a range (a positive integer greater than 0) to generate a random number.
  2. After specifying the range, the program will generate a random number.
  3. You need to make guesses to find the correct number.
  4. The program will provide hints if your guess is above or below the generated number.
  5. Keep guessing until you find the correct number.
  6. The game will display the number of guesses it took to find the correct number.

Example Gameplay

Type a number: 100
Make a guess: 50
You were below the number!
Make a guess: 75
You were below the number!
Make a guess: 90
You were above the number!
Make a guess: 85
You were below the number!
Make a guess: 88
You got it!
You got it in 5 guesses

Feel free to contribute or make suggestions for improvements. Happy coding!

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.