Python-Scripts icon indicating copy to clipboard operation
Python-Scripts copied to clipboard

Added a Python script for Number Guessing Game

Open Saurabh6266 opened this issue 2 months ago • 1 comments

This pull request adds a new Python script named number_guessing_game.py that implements a simple Number Guessing Game.

In this game:

  • The program randomly selects a number within a specific range (default: 1–100).
  • The player tries to guess the number.
  • After each guess, the program provides hints:
    • “Too high!” if the guessed number is greater than the target.
    • “Too low!” if the guessed number is smaller than the target.
  • The game continues until the correct number is guessed.
  • Once the player wins, the program displays the total number of attempts taken.

This script is designed to be beginner-friendly, fully interactive, and easy to run from the command line. It also uses Python’s built-in random module for number generation and loops for continuous gameplay.

Thank you so much!!!

Saurabh6266 avatar Oct 28 '25 10:10 Saurabh6266

Hello, I am a 2nd year college student and this is my first open source contribution. I want to make a good contribution in Hacktoberfest. I am respectfully eager to see your response towards this.

Saurabh6266 avatar Oct 29 '25 09:10 Saurabh6266