So this is my code:
print('How many cats do you have?')
numCats = input()
try:
if int(numCats)>=4:
print('That is a lot of cats.')
elif int(numCats)<0:
print('You can\'t have negative cats, dumbo')
else:
print('That is not that many cats')
except ValueError:
print('You did not enter a number')
Currently, when I enter 'six', it outputs just the error message 'You did not enter a number' and the code ends there. I want the code to loop back to asking 'how many cats do I have' until I enter a non-error answer. Not sure how to do this. Would be great if anyone could offer this newbie some advice.
Mainly, I would like to know how to except a Negative Error, instead of writing an elif statement for it.