1.

Write a Python program to accept number of sides and calculate the perimeter for the given shape based on the number of sides

Answer»

Answer:

INPUT: N = 7, s = 10

Output: Perimeter : 70

Since the sides are 7,

Hence the GIVEN polygon is Heptagon.

Therefore. Perimeter = 7*10 = 70

Input: n = 5, s = 2.5

Output: Perimeter : 12.5

Since the sides are 5,

Hence the given polygon is Pentagon.

Therefore. Perimeter = 5*2.5 = 12.5



Discussion

No Comment Found