import random
x = random.randrange(10) + 1
y = ''
count = 0
while y != x:
        y = int(raw_input('I\'ve picked a number. Make a guess!\n'))
        count += 1
        if y > x:
                print 'Wrong guess! Try lower number!'
        elif y < x:
                print 'Wrong guess! Try higher number!'
                
print 'Congratulation! You guess right, though it took you', count, ' tries'
raw_input('\n\nP')