Level
Find the error
-
# Define a function to calculate the area of a rectangle
-
def calculate_area(length, width):
-
    return length * width
-
print(calculate_area(5, 3))
-
# Now, let's define a function to calculate the volume of a box
-
def calculate_volume(length, width, height)
-
    return length * width * height
-
print(calculate_volume(2, 3, 4))

Function Definition in Python

In this exercise, you'll practice defining functions in Python. Your task is to identify the line with a syntax error in the function definition and then select the correct implementation. Pay attention to the syntax of function definitions, including the use of colons and indentation.