Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 1.08 KB

README.md

File metadata and controls

21 lines (17 loc) · 1.08 KB

Number Guessing Game in Python

Welcome to the Number Guessing Game! This simple Python game challenges you to guess a randomly selected number between 1 and 100. Try to unveil the mystery number in the fewest attempts possible.

Instructions

  1. Run the number_guessing_game() function to start the game.
  2. Enter your guess when prompted.
  3. Receive hints to refine your strategy:
    • If your guess is too low, you'll be informed.
    • If it's too high, you'll receive a different hint.
    • Additional clues based on divisibility and proximity to the secret number are provided.
  4. Continue guessing until you correctly identify the secret number.
  5. The game concludes with a congratulatory message, revealing the secret number and the number of attempts.

Code Overview

  • The game is implemented in Python.
  • A random number between 1 and 100 is generated for each round.
  • Hints are provided based on the player's guess and the properties of the secret number.
  • The game loop continues until the correct number is guessed.

Enjoy the challenge of this engaging Number Guessing Game!