Skip to content

Instantly share code, notes, and snippets.

@victorslimak1
Created November 10, 2017 08:52
Show Gist options
  • Save victorslimak1/8bf75b51eb0d9a70d5046853ffc901c4 to your computer and use it in GitHub Desktop.
Save victorslimak1/8bf75b51eb0d9a70d5046853ffc901c4 to your computer and use it in GitHub Desktop.
Random Number Guessuer created by victor_slimak - https://repl.it/OEaS/4
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