Wouldn't it be a parameter not an argument?

’ Implement the bake_time_remaining() function that takes the actual minutes the lasagna has been in the oven as an argument and returns how many minutes the lasagna still needs to bake based on the EXPECTED_BAKE_TIME .’
My code:
def bake_time_remaining(elapsed_bake_time):
“”“Blah blah blah”“”
return EXPECTED_BAKE_TIME - elapsed_bake_time

  1. You can use codeblocks (```) to make code look reasonable:
def bake_time_remaining(elapsed_bake_time):
"""Blah blah blah"""
    return EXPECTED_BAKE_TIME - elapsed_bake_time
  1. From Stack Overflow,

A parameter is a variable in a method definition. When a method is called, the arguments are the data you pass into the method’s parameters.

The signature defines the parameters. The function receives arguments.

The difference is very subtle, and actually is more conceptual:
‘’’

def say_my_name(person):
Print(f"Your name is: {person}")
‘’’

In this example, the function say_my_name was parameterized to receive only one parameter - (person).

Now let’s use this function:
‘’’

say_my_name(“Tiago”)
Your name is Tiago
‘’’

In this case, we pass “Tiago” as an argument to this function.

So, we passed the argument “Tiago” as a value for the parameter Person.

In other words, we created functions using parameters, which will received the values as a arguments. :v:

1 Like