Created
July 6, 2013 06:19
-
-
Save imbyron/5938881 to your computer and use it in GitHub Desktop.
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
def isEqual(num1,num2): | |
if num1 < num2: | |
print '%d is too small.' %num1 | |
return False | |
if num1 > num2: | |
print '%d is too big.' %num1 | |
return False | |
if num1 == num2: | |
print 'BINGO,you win!!!' | |
return True | |
from random import randint | |
num = randint(1,1000) | |
print 'Guess what i think?' | |
bingo = False | |
while bingo == False: | |
answer = input() | |
bingo = isEqual(answer,num) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment