Area Calculator_Elif Statement_Syntax Error

Following up on the Area Calculator exercise I thought I had it under control until I came across an unexpected syntax error, _ line 14_ the elif statement_, during execution.

How do I resolve that syntax_error?

Link to the exercise: https://www.codecademy.com/courses/learn-python/projects/area-calculator

Raw code below:

“”"
Area Calculator
“”"

print ‘Calculation in action!’

option = raw_input("Enter C or T for Circle or Triangle respectively: ")

if option[0].lower() == ‘c’:
radius = float(raw_input('Enter radius: '))
area = 3.14159 * radius ** 2
print “Area is %s” %area

elif option[0].lower() == ‘t’:
base = float(raw_input('Enter base: '))
height = float(raw_input('Enter height: '))
area = 0.5 * base * height
print “Area is %s” %area

else print “Invalid Shape”

print ‘Exiting…’

Thank you in advance!

1 Like

It’s likely an indentation issue, perhaps? Sort that out and rest will fall into place, surely.

2 Likes