Mar-07-2020, 02:58 AM
(Mar-03-2020, 07:13 AM)Pranav Wrote: You are taking the guess as an integer value but in the "if statement" you are checking whether its equal to a string value. This is wrong since you are trying to compare an integer value with a string value.
Also raw_input() function is for Python 2, use input() function for Python 3.
hidden evaluates to an integer (random.randrange(1,100). So, that should not be a problem.
What is needed is a loop structure which keeps asking for a new guess (based on the evaluation of if.. elif ... else conditions) until the hidden number is guessed.
Hope that helps