Skip to content

feat: add number guessing game implementation#3193

Open
shuvomdhar wants to merge 1 commit into
geekcomputers:masterfrom
shuvomdhar:feat/3188-number-guessing
Open

feat: add number guessing game implementation#3193
shuvomdhar wants to merge 1 commit into
geekcomputers:masterfrom
shuvomdhar:feat/3188-number-guessing

Conversation

@shuvomdhar

Copy link
Copy Markdown

Description

This PR adds a new beginner-friendly Python program, number_guessing.py, implementing an interactive number guessing game.

Features included:

  • User-defined upper bound for the guessing range.
  • Random secret number generation.
  • Input validation for numeric input.
  • Repeated guessing until the correct number is found.
  • "Too High" and "Too Low" hints after each incorrect guess.
  • Displays the total number of guesses taken once the user wins.

The implementation follows the repository's coding style and is intended as a simple educational example demonstrating random number generation, loops, conditionals, and function design.

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 #3188

Testing

Please describe the tests you've run to verify your changes:

  • 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

Screenshots (if applicable)

guessing_game

Add screenshots or demos of your changes if relevant.

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.

Add number_guesse.py feature

1 participant