Q:

Hotter/Colder Number Game in Python

I'm working my way through the Code Academy Python course and have been trying to build small side projects to help reinforce the lessons. 
I'm currently working on a number game. I want the program to select a random number between 1 and 10 and the user to input a guess. 
Then the program will return a message saying you win or a prompt to pick another higher/lower number. 
My code is listed below. I can't get it to reiterate the process with the second user input. 
I don't really want an answer, just a hint.
import random
random.seed()

print "Play the Number Game!"
x = raw_input("Enter a whole number between 1 and 10:")
y = random.randrange(1, 10, 1)

#Add for loop in here to make the game repeat until correct guess?
if x == y:
    print "You win."
    print "Your number was ", x, " and my number was ", y
elif x > y:
    x = raw_input("Your number was too high, pick a lower one: ")
elif x < y:
    x = raw_input("Your number was too low, pick a higher one: ")

A:

You need use a while loop like while x != y:. Here is more info about the while loop.

And you can only use 
import random
y = random.randint(1, 10)

instead other random function.
And I think you should learn about int() function at here.
These are my hints :)
import random
n = random.randint(1, 10)
g = int(raw_input("Enter a whole number between 1 and 10: "))

while g != n:

    if g > n:
        g = int(raw_input("Your number was too high, pick a lower one: "))

    elif g < n:
        g = int(raw_input("Your number was too low, pick a higher one: "))

else:
    print "You win."
    print "Your number was ", g, " and my number was ", n

