I'm writing a program that prompts for an integer and prints the integer, but if something other than an integer is input, the program keeps asking for an integer.
I can't figure out how to get it to reset properly. I have tried different methods but nothing works.
This is my code so far:
inp = input ("Enter a Integer:")
while inp.isdigit():
print (inp)
break
else:
print ("Enter a Integer")
Does anyone have some suggestions?