# L-10.5 MCS 260 Wed 9 Jul 2014 : q07.py
"""
Consider the following game. The computer generates a random natural
number between 1 and 9. This number is the secret.
The user is allowed to make three guesses for the secret.
Write Python code to implement this game.
"""
from random import randint
SECRET = randint(1, 9)
for k in range(3):
    GUESS = raw_input('make a guess : ')
    if SECRET == int(GUESS):
        print 'Congratulations!'
        break
    else:
        print 'Please try again.'
print 'Game over.'
