python does not have a repeated until loop (i want python to keep on repeating until a condition is met)
number guessing - Replit
the code is here i want python to keep on asking for input and when i type anything invalid like saying d for the input it will stop the code is there a way for python just to say like “your input was not valid”?
name = input("Please enter your name: ")
print ("Welcome " + name + “.”)
print(“I am thinking of a number between 0-100. What is it?”)
import random
num = random.randint(0, 100)
guess = input(“Guess here:”)
guess = int(guess)
if guess==num:
print(“You are correct!”)
elif guess > num:
print(“Your guess is too big”)
else:
print(“Your guess is too small”)
##print(num)