option = raw_input("Enter C for circle or T for Triangle: ")
if option == ‘C’ :
radius = float(raw_input (“Enter radius:”))
area = 3.14 * radius ** 2
print ‘The area of the circle with a radius of %s is %s’ %(radius, area)
elif option == ‘T’ :
base= float(raw_input(“Enter base:”))
height= float(raw_input(“Enter height:”))
area = 0.5baseheight
print ‘The are of a triangle with a base of %s and a height of %s is %s’ %(base, height, area)
The error that comes up:: Traceback (most recent call last):
File “AreaCalculator.py”, line 9 in
if option == ‘C’ :
NameError: name ‘option’ is not defined
I have made line 9 bold in this question. Please help.