Need Help Here pls


#1

here File "AreaCalculator.py", line 23
elif option == 'T':
^
SyntaxError: invalid syntax

and this what i do :frowning:

"""
THis
Is
AreaCalculator
"""
from math import pi
from time import sleep
from datetime import datetime
now = datetime.now()
print now
print "The Calculator Is Starting Now Hype!!"
print '%s/%s/%s' % (now.month,now.day,now.year) , '%s:%s' % (now.hour,now.minute)
sleep(1)
hint = "Don't forget to include the correct units ! \nExiting..."
option = 'Enter C for Circle or T for Triangle:'
option = option.upper()
if option == 'C' :
radius = float(raw_input("Enter radius: "))
area = pi * radius**2
print "The pie is baking..."
sleep(1)
print ("Area: %.2f. \n%s" % (area, hint))
elif option == 'T':
base = float(raw_input("Enter The Base Of The Triangle :"))
height = float(raw_input("enter the height of the triangle :"))
area = (0.5)baseheight
print "Uni Bi Tri..."
sleep(1)
print ("Area: %.2f. \n%s" % (area, hint))
else :
print "Error! Invalid shape selector specified. Exiting."


#2

From what I see, this is most likely an indentation error. :slight_smile:


#3

how can i fix it <3 ? :smiley:


#4

I don't know, you would need to format your code. :slight_smile:


#5