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
Write a program to calculate amount payable after simple interest.
Find the volume of the cylinder (πr2h) as shown:
Radius = 8 cm
Height = 15 cmWrite a program to input the radius of a sphere and calculate its volume (V = 4/3πr3)
Write a program that inputs a string and then prints it equal to number of times its length, e.g.,
Enter string : "eka"
Result ekaekaeka