Trouble with Python Syntax


#1

Hi all, I keep receiving a Syntaxerror for the following code, let me know where I’ve gone wrong. This is part of Codecademy’s Python Area Calculator exercise. The indent after the “if” is 4 spaces.


#This calculator serves take a shape, calculate the area of the shape, and then print the area of the shape to the user

print "The calculator is blasting off!"
option = raw_input("Enter C for Circle or T for Triangle")

# This code below translates to: if option is equal to the character C, then do the following...
if option == "C":
#If the above is true, then the following will initialize...
    radius = float(raw_input("Enter radius: ")
    area = 3.14159 * radius**2
print "Area: %f" % area
  
else:
  print "incorrect"

#2

this line doesn’t have 4 spaces indent:

print "Area: %f" % area

as such, else is not after if, it should be:

if condition:
   print "do something"

else:
  print "do something else"