Im writing a program tha outputs the area and perimeter of a shape after they entered the name of the shape and its dimensions. It worked until my pentagon code but after that for the area, it just returns none as the area:
import math
def perimeter_pentagon(lenght): #function for perimiter of pentagon
pentPerimeter=5*length
return(pentPerimeter)
def area_pentagon(length): #function for area of a pentagon
PentagonArea=(1/4*math.sqrt(5*(5+2*math.sqrt(5)))*length*length)
shape=input("Enter your shape ") #asks the user for their shape
(skipping the other if and elif statments)
else:
length=float(input("Enter the length "))
PentagonArea=area_pentagon(length)
PentagonPerimeter=perimeter_pentagon(length)
print("The area of your pentagon is: ", PentagonArea)
print("The perimeter of your pentagon is: ", PentagonPerimeter)