Skip to content

Add range validation to guessing game input#80

Open
aaiiddaan7 wants to merge 1 commit intoBerat-O:mainfrom
aaiiddaan7:add-guess-range-validation
Open

Add range validation to guessing game input#80
aaiiddaan7 wants to merge 1 commit intoBerat-O:mainfrom
aaiiddaan7:add-guess-range-validation

Conversation

@aaiiddaan7
Copy link

Summary

Added validation to ensure guesses stay within the 1–100 range.

Changes made

  • Added a check for guesses below 1 or above 100
  • Displayed a message prompting the user to enter a valid number
  • Kept the loop running without counting invalid range guesses as attempts

Why

The game states that the secret number is between 1 and 100, so validating guesses against that range makes the rules clearer and improves the user experience.

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