I have been trying to make a number guessing game for Python and so far it has altogether gone quite well. But what keeps bugging me is that it resets the number on every guess so that it is different, but I want it to stay the same and then people can take a while guessing it.
import os
import timeprint("this is a random number generator")
number1 =int(input("please pick a NUMBER between 1 and 99"))
from random import randint
number2 = int(randint(1,99))
if number1 == number2:print(" congrats! you got it right")
elif number1 < number2:print ("too low try again")
elif number1 > number2:print ("too high try again")if number1 not in range(1,99):print("you idiot! Pick a number IN THE RANGE")while number1 != number2:print("this is a random number generator")number1 =int(input("please pick a NUMBER between 1 and 99"))from random import randintnumber2 = int(randint(1,99))if number1 == number2:print(" congrats! you got it right")elif number1 < number2:print ("too low try again")elif number1 > number2:print ("too high try again")if number1 not in range(1,99):print("you idiot! Pick a number IN THE RANGE")time.sleep(10)
os.system("exit")