Area calculator project: syntax error


Hi guys,

Ran into another problem with my code. This time I get a syntax error, please see below:

File "", line 25
SyntaxError: invalid syntax

Below is the code I wrote for the project. I indented four spaces, but still receive the error. Any advise would be appreciated:

from math import pi
from time import sleep
from datetime import datetime

now =

print "Calculator is starting up!"

print "Current time: %s/%s/%s %s:%s" % (now.month,, now.year, now.hour, now.minute)


hint = "Don't forget to include the correct units! \nExiting"

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

if option == 'C':
    radius = float(raw_input("Enter radius: "))
    area = pi * radius**2  
    print "The pie is baking..."
    print ("Area: %.2f. \n%s" % (area, hint))
    option == 'T':
    base = float(raw_input("Enter base: "))
    height = float(raw_input("Enter base: ")
    area = (0.5)*base*height
    print "Uni Bi Tri..."                   
    print ("Area: %.2f. \n%s" % (area, hint))      
    print "Error! Invalid shape selector specified. Exiting."


For some reason, on the comment the spaces are not showing the indentation. But I think that's where the issue lies.


Please post a link to this exercise. Thank you.


Should line up with if and be on one line:

    elif option == "T":


now I get this error when I try to fix.

File "", line
area = (0.5)baseheight
SyntaxError: invalid syntax


area = (0.5) * base * height


Sounds like an indentation error, perhaps? Everything after the elif must be indented four spaces.


Up and running. Thanks!