KnowledgeBoat Logo

Computer Science

Write a program to calculate the area of an equilateral triangle. (area = (√3 / 4) * side * side).

Python

Python Data Handling

35 Likes

Answer

import math

side = float(input("Enter side: "))
area = math.sqrt(3) / 4 * side * side

print("Area of triangle =", area)

Output

Enter side: 5
Area of triangle = 10.825317547305481

Answered By

21 Likes


Related Questions