Indentation error; please help


#1


https://www.codecademy.com/en/courses/python-ext/projects/area-calculator?link_content_target=interstitial_project

indentation error on line 31

run normal program


""" Hi, This is calculator 101>> Enter your shape and get the Area """

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

now = datetime.now()
print " The calc is now firing up"

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

sleep (1)

hint = "Don't forget to include the correct units! \n Exiting... "



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


if option == 'C':
    radius = float(raw_input('Enter radius'))
    area= pi*radius**2
    print 'Wait please while your calculation is in 		\n 		process'
    sleep(1)
    print hint, area
  
elif option == 'T':
    base= float(raw_input ('Enter base value'))
    height= float(raw_input ('Enter height value'))
		area = 0.5*base*height
    print 'The process is ONNN... \n'
    print area
    
else:
    print 'You just entered some garbage'


#2

that is weird, it looks fine. Did you copy paste between different editors?

simply re-indent it:

elif option == 'T':
    base= float(raw_input ('Enter base value'))
    height= float(raw_input ('Enter height value'))
    area = 0.5*base*height
    print 'The process is ONNN... \n'
    print area

#3

still doesnt work. seems an issue with the editor


#4

very likely, such issues require fiddling with the editor


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.