I am using Python in an attempt to create an Area Calculator (similar to the one from Code Academy). Only my else statement seems to be running:
print("Area Calculator.")
print ("Select Shape:")
print ("Circle or Triangle? ")
answer = input()
if answer == "Circle" or "C" or "c" or "circle":
radius = float(input("Input Radius: "))
area_c = (3.12159 * radius) * 2
print (area_c)
elif answer == "Triangle" or "T" or "t" or "triangle":
base = float(input("Input Base: "))
height = float(input("Input Height: "))
area_t = (.5 * base) * height
print (area_t)
else:
print ("error")
I edit texts using PyCharm and no syntax errors or errors of any other kind return. Regardless of what I respond into the answer input (whether they are integers or syntax) the code always displays line 8 [radius = float(input("Input Radius: "))]
I am sorry if this turns out to be an easy fix. I am just getting started with Python and have tried a variety of indentation and syntactical variations to no avail.