#try to avoid input function
a = input("enter any string(triangle,square,rectangle)")
if a == "triangle":
b = int(input("Enter base of the triangle"))
c = int(input("Enter height of the triangle"))
print((1/2)*b*c)
elif a == "square":
b = int(input("Enter side of the square."))
print(b*b)
elif a == "rectangle":
b = int(input("Enter lenght of the rectangle"))
c = int(input("Enter width of the rectangle"))
print(b*c)
else:
print("Invalid Input")
Click the run button. Try to avoid input() function.