Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Challenge #1 [difficult]

View gist:1862619
1 2 3 4 5 6 7 8
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.