Skip to content

Instantly share code, notes, and snippets.

@kevin-weitgenant
Created August 3, 2016 21:57
Show Gist options
  • Save kevin-weitgenant/f03614d896d950839454c0707ea0e70e to your computer and use it in GitHub Desktop.
Save kevin-weitgenant/f03614d896d950839454c0707ea0e70e to your computer and use it in GitHub Desktop.
practicepython.org Exercise 09
import random
a = random.randint(1, 9)
x = ""
while x != "exit":
user_number = int(input("Choose a number between 1 and 9:"))
if a > user_number:
print("Too low!")
elif a < user_number:
print("Too High!")
else:
print("You're goddamn right!")
x = input("exit to leave, any key to try again")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment