Created
November 10, 2017 08:52
-
-
Save victorslimak1/8bf75b51eb0d9a70d5046853ffc901c4 to your computer and use it in GitHub Desktop.
Random Number Guessuer created by victor_slimak - https://repl.it/OEaS/4
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 | |
tries = 0 | |
randomNum = random.randrange(1, 100) | |
while tries<3: | |
tries=tries+1 | |
guess = int(input("Guess a number between 1 and 100")) | |
if guess == randomNum: | |
print("Correct") | |
print("Game Over") | |
elif guess<randomNum: | |
print("Higher") | |
else: | |
print("Lower") | |
if tries == 3: | |
print("Game Over") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment