Typo? "A parameter acts as a variable name for a passed in argument." What?


#1

In the Parameters and Arguments lesson, the following sentence exists:

"A parameter acts as a variable name for a passed in argument."

Am I correct in reading this as a typo? How should it read? If not, what is a "passed in argument"?


Replace this line with your code.


#2

Hi, @grayvie,

Following is a function definition followed by a function call ...

def square(n):
    return n ** 2
    
print(square(7))

A variable named n is specified as a parameter in the function header, here ...

def square(n):

in the following, the function is called with 7 as the passed in argument, or, rephrased, as the argument that is passed in ...

print(square(7))

Now, as the function executes, the variable, n, will have the value, 7.


#3

Thank you for the explanation and for clarifying. I find it silly that "passed in argument" is a noun.


#4