Last active
November 10, 2019 02:24
-
-
Save bsoyka/a253dd91974d2b91010c85064480e4cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
correct = random.randint(1, 10) | |
guess = input("Enter your guess: ") | |
guess = int(guess) | |
while guess != correct: | |
if guess > correct: | |
print("You've guessed too high. Try guessing lower.") | |
else: | |
print("You've guessed too low. Try guessing higher.") | |
guess = int(input("Enter your guess: ")) | |
print("Congratulations! You've guessed correctly.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment