Skip to content

Add number_guesse.py feature #3188

Description

@vivek2004-sec

Is your feature request related to a problem?

Currently the repository lacks an interactive
number guessing game implementation. There is no
example that demonstrates random number generation
combined with user input validation and game loop
logic in a beginner-friendly way.

Describe the Solution

Add a number_guessing.py file that implements a
complete number guessing game where:

  • User defines the upper bound of the range
  • Program generates a secret random number
  • User guesses repeatedly until correct
  • Program responds with "Too High" or "Too Low" hints
  • Final score shows total number of guesses taken

Describe Alternatives

An alternative would be to add this as part of an
existing file, however a standalone file keeps the
code clean, readable, and easy to understand for
beginners learning Python fundamentals.

Additional Context

This is a classic beginner algorithm that covers:

  • random module usage
  • Input validation
  • While loops
  • Conditional statements
  • Function design with type hints

The file will follow all repository contribution
guidelines including proper docstrings and clean
code structure.

Complexity

  • Simple (< 50 lines)
  • Medium (50-200 lines)
  • Complex (> 200 lines)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions