When I compile the Python code below, I get
IndentationError: unindent does not match any outer indentation level
Since I realize there's no answer specific to spyder
,I'll add one:
Basically, carefully look at your if
statement and make sure all if
, elif
and else
have the same spacing that is they're in the same line at the start like so:
def your_choice(answer):
if answer>5:
print("You're overaged")
elif answer<=5 and answer>1:
print("Welcome to the toddler's club!")
else:
print("No worries mate!")