Make a "Number Guessing Game" in python with the program our teacher gave us except this time the computer should ask the user until the user gets it right, should
respond with " # is too low" or "# is too high" and the answer must be hardcoded.
this is the code:
guess = input("Guess a number between 1 and 10: ")
if guess.isdigit():
if guess == 8:
print("That's Correct")
elif guess > 8:
print("# is too too high")
elif guess < 8:
print("# is too low")
else:
print("That's not a number")
I know it's a lot but I'm struggling with this every time I try to make a program for this it says that it wont compare 'int' and 'str' or it will just keep on asking instead of saying "too low" or "too high"
Thanks