Should the function have 3 parameters?

Hi, after renaming the function to mult_x_add_y And now, add x and y as parameters of the function, after number .

Maybe, it would help to precise that the function has 3 ( THREE ) parameters : 1 - number, 2 - x and 3 - y

this kind of precision would help understand the change in the numbers of the parameters, and ease the execution of the following instructions.

We cannot evaluate values in the parameter list.

def foo(1 - number, 2 - x and 3 - y):

foo(a, b, c)

def foo(number, x, y):

foo(1 - a, 2 - b, 3 - c)

The latter example evaluates the arguments and passes the resulting values.

Yes. You are right. And I agree with you.The 3 parameters remark deals with the way the question is worded in the course. I would have spent less time trying to solve this simple question if it was written more clearly : Now add two parameters to the parameter number. Now, the function have 3 parameters. That’s a way to ease the study and is more related to the teachers team. It is a matter of clarity.

1 Like