def area(width, length): print(f"Area of a {width} * {length} rectangle: {width * length}") # The print statement is an example of 'side effect': action other than the return value. Side effects should be avoided as much as possible. area(5,6) area(7,10) # A better version: no side effect and use the return statement. It is also more general and useful. def area2(width, length): return width * length print(f"area2(5,6): {area2(5,6)}") print(f"area2(7,2*4+2): {area2(7,2*4+2)}") width_1 = 5 length_1 = 6 print(f"Area of a {width_1} * {length_1} rectangle: {area2(width_1, length_1)}") width_2 = 7 length_2 = 10 print(f"Sum of the areas of the two rectangles: {area2(width_1, length_1) + area2(width_2, length_2)}") def hello(name): """ hello takes a name as a parameter and prints a greeting. """ print(f"Hello, {name}!") print("Nice to meet you.") hello('Bun') hello('Jane')