{"id":18859,"date":"2021-08-26T10:37:46","date_gmt":"2021-08-26T05:07:46","guid":{"rendered":"https:\/\/python-programs.com\/?p=18859"},"modified":"2021-11-22T18:37:19","modified_gmt":"2021-11-22T13:07:19","slug":"python-program-to-compute-the-area-and-perimeter-of-pentagon","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-compute-the-area-and-perimeter-of-pentagon\/","title":{"rendered":"Python Program to Compute the Area and Perimeter of Pentagon"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Compute the Area and Perimeter of Octagon<\/a>
\nPentagon:<\/strong><\/p>\n

A pentagon (from the Greek v Pente and gonia, which mean five and angle) is any five-sided polygon or 5-gon. A simple pentagon’s internal angles add up to 540\u00b0.<\/p>\n

A pentagon can be simple or complex, and it can be self-intersecting. A pentagram is a self-intersecting regular pentagon (or a star pentagon).<\/p>\n

\n

Formula to calculate the area of a pentagon:<\/b><\/p>\n

<\/a><\/p>\n

\n
<\/div>\n
\u00a0In which, a= The Pentagon’s side length<\/div>\n<\/div>\n<\/div>\n

Formula to calculate the perimeter of a pentagon:<\/b><\/strong><\/p>\n

perimeter = 5a<\/div>\n
<\/div>\n
Given the Pentagon’s side length and the task is to calculate the area and perimeter of the given Pentagon.<\/div>\n
<\/div>\n
Examples:<\/strong><\/div>\n
\n

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

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

Given The Pentagon's side length = 10<\/pre>\n

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

The Pentagon's area with given side length { 10 } = 172.0477400588967\r\nThe Pentagon's Perimeter with given side length { 10 } = 50<\/pre>\n

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

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

Given The Pentagon's side length = 5.5<\/pre>\n

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

The Pentagon's area with given side length { 5.5 } = 52.04444136781625\r\nThe Pentagon's Perimeter with given side length { 5.5 } = 27.5<\/pre>\n<\/div>\n

Program to Compute the Area and Perimeter of Pentagon in Python<\/h2>\n

Below are the ways to Calculate the area and perimeter of a pentagon with the given Pentagon’s side length:<\/p>\n