Skip to content

Instantly share code, notes, and snippets.

@LeoAdamek
Created January 30, 2012 17:49
Show Gist options
  • Save LeoAdamek/1705654 to your computer and use it in GitHub Desktop.
Save LeoAdamek/1705654 to your computer and use it in GitHub Desktop.
Simplist numbergame
# NumberGame.py - Most simple program
from random import randint
number_to_guess = randint(1,100)
guess = input('Enter a number between 1 and 100: ')
while not guess == number_to_guess:
if guess > number_to_guess:
print "Too High."
else:
print "Too Low"
guess = input('Enter a number between 1 and 100: ')
print "Congratulations, the number was ", number_to_guess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment