Python program to findarea of equalteral triangle
Answers
Answered by
1
Answer:
#Python
Explanation:
from math import sqrt
a = int(input("Enter side " ))
area = sqrt(3)/4 * (a**2)
print(area)
Answered by
0
Below are the python program for the question above :
Explanation:
from math import sqrt #package for the sqrt function.
side = float(input("Enter side to find the area :" ))#take the input from the user.
print("The area is = : ",(sqrt(3)/4)*(side**2)) #print the area.
Output :
- If the user input as 3, then the output is : 3.8971143170299736
- If the user input as 1, then the output is : 0.4330127018922193
Code Explanation:
- The above code is in python language, which takes the input from the user and then saves it in side variable after converting it into the float.
- Then the formula of the equilateral triangle is used to find the area of a triangle and print the area with the help of print function.
Learn More :
- Python : https://brainly.in/question/14689905
Similar questions