Skip to content

Instantly share code, notes, and snippets.

@imbyron
Created July 6, 2013 06:19
Show Gist options
  • Save imbyron/5938881 to your computer and use it in GitHub Desktop.
Save imbyron/5938881 to your computer and use it in GitHub Desktop.
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