# 6. More than one argument - Instructions

The instructions for “6. More than one argument” are to “Define a function called `add_function` that has 2 parameters `x` and `y` and adds them together.”

That would be this:

``````m = 5
n = 13
x + y

``````

That’s an odd set of instructions, because nothing is done with the summed value of `x` and `y`. Additionally, this solution is not counted as correct, because the function is supposed to return the sum of `x` and `y`. I think the exercise would be clearer if this extra step were mentioned in the instructions.

“Define a function called `add_function` that has 2 parameters `x` and `y`, adds them together, and returns the total.”

2 Likes

It is assumed that you use return, because you must to get output from a function.

I think your statement is false. Not all functions give a return value, so it should not be assumed.

For example, a function might take a list as a parameter and modify that list directly. It then would not need to return the list in order for the changes to be reflected after the function’s operations are concluded.

Therefore, the instructions would be better with the ambiguity removed.

It usually doesn’t occur that a list is directly changed, but a copy operated on. I don’t think you ever directly change the content of a variable with functions.

m = 5
n = 13

return x+y

1 Like

I think the instructions are wrong because there are no variables declared as x or y so what is it going to add.
By changing the functions arguments to “m” and “n” it works.

m = 5
n = 13