So I'm very new to Python and I'm trying to my "Hello World" game to test what I've learned. in the process I'm trying to challenge myself and make it EVEN more simple than it already is and clean up my code a lot. But whilst getting my code off the ground I ran into the problem that my while loop isn't updating and looping correctly. Please take a look
import random
Ran = random.randrange(1,100)
guess = raw_input("Go ahead: ")
while (guess != Ran):
guess = raw_input("Try again: ")
print "You got it!"
So basically it's just to see if the guess var is equal to the rand number but when it sees, "oh no you are not equal to that random number sorry you get passed to else." "Hi I'm else you are not the right number to get out our loop. So this a new input box and it is going to change the value of guess then send you back to while for checking."
But somewhere along the line it just passes right through while and ends up at else Can anyone help me figure out why this is happening? I really appreciate it :)
Python ver = 2.7.12