I keep getting an unspecific syntax error on
elif option == 'T':
I've looked at other forum posts, tried various indentations and even copy/pasted stuff into my code to see if it would work but it doesn't appear to. Can anyone see what's wrong with my code? Any help is appreciated.
from math import pi # imports a thing from time import sleep # imports date and time info from datetime import datetime now = datetime.now() print ("Welcome to the severly limited Calculator!") 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, bruh. \nExiting..." option = raw_input("Welcome, will you be calculating a circle or a triangle today? C/T: ") option = option.upper() if option == 'C': radius = float(raw_input("Wut ur radius, bruh?: ")) area = pi * radius**2 print 'Pi is baking. Get it?' sleep(1) print ("Area: %.2f. \n%s" % (area, hint)) elif option == 'T': base = float(raw_input("What is the base of the triangle?: ")) height = float(raw_input("Triangles height: ")) area = (0.5) * base * height print ("hmm...") sleep(1) print ("Area: %.2f. \n%s" % (area, hint)) else: print ("I sed enter 'C' or 'T', bruh")