Question: Write the following Python functions with a variable-length arguments list o Do NOT use Python built-in functions such as max(), sum(), etc. 1. maxVal -
Write the following Python functions with a variable-length arguments list o Do NOT use Python built-in functions such as max(), sum(), etc. 1. maxVal - returns the largest of arguments (at least one argument needed) .print(maxVal(2)) print(maxVal(2, 1)) print(maxVal(2, 1, 9)) 2. average - returns the average of arguments. If no arguments, return 0. .print(average()) print(average(9)) print(average(1, 2, 3)) print(average(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) 3. sumOfEvenNum - returns the sum of even numbers of arguments (at least one argument needed) print(sumOfEven Num(1, 2, 3)) print(sumOfEvenNum(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
