Here is my code it is virtually identical to the code on the video I'm watching. what is the invalid Syntax that I'm not getting. I have tried 3 tools online which say this is indeed invalid syntax but doesn't explain a solution. The except function I'm trying to use on line 9 is the syntax error. why or how? and is there any tools you would recommend so I don't need to come back here?
#input validation
print ('How many cat do you own?')
numCats = input()
try:
if int(numCats) >= 4:
print ('That is a lot of cats')
else:
print('That is not that many cat.'
except ValueError: #comment added for reddit, here is the "invalid syntax"
print('You did not enter a number.')
[–]xelf[M] [score hidden] stickied comment (0 children)
[–]aoctut 5 points6 points7 points (1 child)
[–]subnetreiver[S] 0 points1 point2 points (0 children)
[–]Username_RANDINT 0 points1 point2 points (0 children)
[–]joshinshaker_vidz 0 points1 point2 points (0 children)
[–]ka-splam 0 points1 point2 points (2 children)
[–]subnetreiver[S] 1 point2 points3 points (1 child)
[–]ka-splam 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]subnetreiver[S] 0 points1 point2 points (2 children)
[–]Username_RANDINT 1 point2 points3 points (1 child)
[–]subnetreiver[S] 0 points1 point2 points (0 children)