Simple number guessing game in python
This looks to do the job. I would only change the variable naming to be more meaningful in this context to guess for user guess and answer for the generated number.
I would also try to handle erroneous input such as strings instead of numbers being passed.
But besides this is still functionally good :D