Trying to do a simple guessing game program in python, but I'm more comfortable in java. When the correct number is entered, it says it is too high and won't exit the while loop. Any suggestions?
import random
comp_num = random.randint(1,101)
print comp_num
players_guess = raw_input("Guess a number between 1 and 100: ")
while players_guess != comp_num:
if players_guess > comp_num:
print "Your guess is too high!"
elif players_guess < comp_num:
print "Your guess is too low!"
players_guess = raw_input("Guess another number between 1 and 100: ")
print "CONGRATULATIONS! YOU GUESSED CORRECTLY!"
eliffor the secondif...