之前03.04.01version 2024.02.04
side_num = eval(input("Enter the side: "))
area_num = (5 * pow(side_num, 2)) / (4 * math.tan(math.pi / 5))
print("The area of the pentagon is {:>.20f}".format(area_num))
本次代码
def area(side_num):
side_num = eval(input("Enter the side: "))
area_num = (5 * pow(side_num, 2)) / (4 * math.tan(math.pi / 5))
print("The area of the pentagon is {:>.20f}".format(area_num))
area(5)