#!/usr/bin/env python
#
# number between 1 and 1000
#

low = 1
high = 1001
i = 1
answer = ""
while (high >= low) and (answer!="equal"):
    mid= int((high + low) / 2)
    print(("Is your number equal to, greater than, or less than ") , mid)
    answer = input("Please answer with 'equal', 'greater', or 'less'. ")
    if answer == "equal":
        print("That is great!")
        print("Answer is: ", mid)
    elif answer == "greater":
        print("i guess my low value is too low")
        low = mid + 1
    else:
        print("I guess my high value is too high")
        high = mid - 1
    if low > high:
        print("You are lying:)")
    print("This was question ", i)
    i = i+1
