Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions guessing-game/guessing-game.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
# Ask the user for their guess
guess = int(input("Enter your guess: "))

# Ensure that guess is between 1-100
if guess < 1 or guess > 100:
print("Please enter a number between 1 and 100.\n")
continue

# Check if the guess is correct
if guess == secret_number:
print("🎉 Congratulations! You guessed the number!")
Expand Down