#!/usr/bin/env python

comp = ""
upper = 1000
lower = 0

while comp != "=":
	guess = (upper + lower)/2
	print("Is your number greater, equal, or lower than ", guess, " ")
	print("(Enter >, =, or < accordingly)")
	comp = input()
	if comp == ">":
		lower = (upper + lower)/2
	if comp == "<":
		upper = (upper + lower)/2
	if comp == "=":
		print("I win!")
