{"id":22752,"date":"2021-09-27T15:43:17","date_gmt":"2021-09-27T10:13:17","guid":{"rendered":"https:\/\/python-programs.com\/?p=22752"},"modified":"2021-11-22T18:35:37","modified_gmt":"2021-11-22T13:05:37","slug":"python-program-to-calculate-area-and-perimeter-of-equilateral-triangle","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-calculate-area-and-perimeter-of-equilateral-triangle\/","title":{"rendered":"Python Program to Calculate Area and Perimeter of Equilateral Triangle"},"content":{"rendered":"

In the previous article, we have discussed Python Program for Maximum Number of 2\u00d72 Squares That Can be Fit Inside a Right Isosceles Triangle<\/a>
\nGiven the side length of the equilateral triangle and the task is to calculate the area and perimeter of the equilateral triangle with the given side length.<\/p>\n

Equilateral triangle:<\/strong><\/p>\n

An equilateral triangle is one with equal sides and angles on all three sides. The internal angles of an equilateral triangle are all 60 degrees.<\/p>\n

Formulas:<\/strong><\/p>\n

Let ‘a’<\/strong> be the side length of the equilateral triangle.<\/p>\n

Area = (sqrt(3)\/4) * a * a<\/p>\n

Perimeter = 3*a<\/p><\/blockquote>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given side length = 8<\/pre>\n

Output:<\/strong><\/p>\n

The Area of Equilateral Triangle with the given side length [ 8 ] =  27.712813\r\nThe Perimeter of Equilateral Triangle with the given side length [ 8 ] =  24.000000<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given side length = 5<\/pre>\n

Output:<\/strong><\/p>\n

The Area of Equilateral Triangle with the given side length [ 5 ] =  10.825318\r\nThe Perimeter of Equilateral Triangle with the given side length [ 5 ] =  15.000000<\/pre>\n

Program to Calculate Area and Perimeter of Equilateral Triangle in Python<\/h2>\n

Below are the ways to calculate the area and perimeter of the equilateral triangle with the given side length:<\/p>\n