Skip to content

Conversation

@darshacharya
Copy link

The program randomly selects a secret number between 1 and 10. The user is then given up to three attempts to guess that number. After each guess, the program immediately tells the user whether the guess is too low, too high, or correct. If the user guesses correctly within three tries, the game ends and the user wins. If all three attempts are used without a correct guess, the game ends and the program reveals the correct number.

It also prevents crashes by rejecting non-numeric input instead of blindly failing.

@darshacharya darshacharya marked this pull request as draft December 28, 2025 07:02
@darshacharya darshacharya marked this pull request as ready for review December 28, 2025 07:03
@darshacharya darshacharya marked this pull request as draft December 28, 2025 07:03
@darshacharya darshacharya reopened this Dec 28, 2025
@darshacharya darshacharya marked this pull request as ready for review December 28, 2025 07:08
@darshacharya
Copy link
Author

Hi @souravjain540, I’ve added a simple number guessing game with input validation.
Requesting a review when you have time. Thanks!

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