Created
January 30, 2012 17:49
-
-
Save LeoAdamek/1705654 to your computer and use it in GitHub Desktop.
Simplist numbergame
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
# 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