I need for the questioning part of the code to occur until the player has guessed the number.
I'm a bit of a beginner, and I'm writing a simple code for guessing a number. I've gotten to a point where I have everything I need, but I need it so the script runs until they've guessed the number. I'm not sure if I'm forgetting or if my book is outdated on how to do this. Thanks for any help!
randomnumber = random.randint(1,101)
questioning = input("Guess a number!: ")
answered_edited = int(questioning)
randmnew = int(randomnumber)
if answered_edited == randmnew:
print("You've won! Just don't get too ahead of yourself /n since this was
only a simple game any child could play.")
elif answered_edited < randmnew:
print("It's greater than that you twat")
elif answered_edited > randmnew:
print("You're a little low shawty")
I would like the script to run and continually ask the question of what number until the player guesses