Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Challenge #1 [difficult]
from random import *
min, max, result = 1, 100, ''
while result != 'y':
guess = randint(min, max)
result = raw_input('Is your number {}? (Y|H|L) '.format(guess)).lower()[0]
if result == 'h': max = guess
elif result == 'l': min = guess
print "Your number is {}.".format(guess)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.