# Write a program that guesses a number the user is thinking of!

#SETUP
import random

def pick(lowerBound,upperBound):
    return (lowerBound+upperBound)/2

def pick2(lowerBound, upperBound):
    return random.randint(lowerBound,upperBound)

def stupidPick(lowerBound, upperBound):
    return 5

U = 100
L = 1

#GAME

while True:
    guess = pick( L , U )
    result = input("Is " + str(guess) + " correct? (g,l or c)")
    if result == "g":
        U = guess
    elif result == "l":
        L = guess
    elif result == "c":
        print("CONGRATULATIONS!")
        break
    else:
        print("Something went horribly wrong.")


