Skip to content

Here we will dive into the inner workings of the perimeter_of_rectangle function.

This function takes two parameters: height and width. These are passed into the equation perimeter = 2*(width+height).

The function then returns perimeter.

For any questions or concerns, please consult ChatGPT.

Here is the function:

Source code in rectangles.py
7
8
9
def perimeter_of_rectangle(width, height):
    perimeter = 2*(width + height)
    return perimeter