#this is a sample guess program import random guesses_made =0 name = raw_input('Hello! whats your name? ') number = random.randint(1,20) print 'well {0}, I am thinking a number between 1 to 20.'.format(name) while guesses_made <6: guess = int( raw_input('Take a guess:')) guesses_made +=1 if guess > number : print '{0},your guess is too hight!'.format(name) if guess < number: print '{0},your guess is too low!'.format(name) if guess == number : break if guess ==number: print 'good job {0}, your just guess {1} times'.format(name,guesses_made) else: print ' nope {0},the number is {1},you guess{2} times'.format(name, number,guesses_made)