Last answered:

16 Mar 2023

Posted on:

15 Mar 2023

1

Do we need the "first" variable for this function?

Is there a reason we also need to include the "first" variable?


Eg - the following also appears to work, without adding "first" as a variable to pass to the function:


def calc_mean(*remainder):
    mean = (sum(remainder)/len(remainder))
    return mean

1 answers ( 0 marked as helpful)
Instructor
Posted on:

16 Mar 2023

2

Hey Richard,


Thank you fo reaching out!


I don't see an immediate benefit of including the argument first. The simplification you suggest indeed works as expected. 


Kind regards,

365 Hristina

Submit an answer