#create a function that calculates the perimeter of a circle
def perimeter(radius):
"""
Calculate the perimeter of a circle.
Parameters
----------
radius : float
The radius of the circle.
Returns
-------
float
The perimeter of the circle.
"""
#return the perimeter of the circle
return 2 * math.pi * radius
#example
result = perimeter(5)
#output
print(result) #31.41592653589793
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)