Generate a random number between 1 and 9 (including 1 and 9). Ask the user to guess the number, then tell them whether they guessed too low, too high, or exactly right.
Extension
Possible extensions to this game include:
allow the user to change the range of the numbers chosen
keep the game going until the user types "exit"
keep track of how many guesses the user has taken, and when the game ends, print this out.