I'm trying to learn Python 3 and I'm wondering how I would loop something...
print("how many cats do you have?")
numCats = input()
try:
if int(numCats) >= 4:
print('That is a lot of cats.')
elif int(numCats) in range(1, 3):
print('That is not that many cats.')
elif int(numCats) == 0:
print("Oh, you have no cats.")
except ValueError:
print('You did not enter a number.')
I want to make it so that when it says, "You did not enter a number." it loops back to "How many cats do you have?"