Skip to content

Add number guessing game with input validation and guess counter - #3217

Open
chmodgaurav wants to merge 1 commit into
geekcomputers:masterfrom
chmodgaurav:feature/number-guessing-game
Open

Add number guessing game with input validation and guess counter#3217
chmodgaurav wants to merge 1 commit into
geekcomputers:masterfrom
chmodgaurav:feature/number-guessing-game

Conversation

@chmodgaurav

@chmodgaurav chmodgaurav commented Aug 18, 2026

Copy link
Copy Markdown

Description

Adds NUMBER_GUESSING.py, an interactive number guessing game. The user
specifies an upper bound, the program picks a random secret number within
that range, and the user guesses repeatedly until correct. The game
validates input (rejects non-integers and out-of-range guesses) and
reports the total number of guesses taken at the end. Also updates
README.md to list the new script.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code cleanup/refactoring

Related Issues

Closes #(issue number)

Testing

  • Manual testing
  • Added automated tests
  • Existing tests pass

Checklist

  • My code follows the project's code style
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the README.md if needed
  • My changes generate no new warnings
  • I have tested my code locally
  • New and existing tests pass with my changes

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant