Area Calculator error message


#1

Hi All,

I am finding it hard to figure out the error with my coding. With the below code, I get the following error message.

"File “AreaCalculator.py”, line 19
elif option == ‘T’:
SyntaxError: invalid syntax

Can someone explain to me the number of indentation I should be applying? And/or what the issue is with my code.


#2

elif has to be after an if or another elif:

if False:
   print "do something"
elif True:
   print "do something else"

you nested the elif inside the if clause.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.