Python 3

Calculating Area and Perimeter of Pentagon in Python 3

Calculating the area of a pentagon in Ptyhon3, “a” and “r” length must be known.  You see a triangle in the bottom picture. After calculating the area of the triangle, the area of the pentagon can be found by multiplying with 5.

 

Python3 Code:

 

Output:

Online Editor:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.