Question: In Python, Solve Problem 1 of Assignment 5 using while loop. [Assignment 5-1 Problem Statement: Define an average function that takes 4 arguments and returns
In Python, Solve Problem 1 of Assignment 5 using while loop. [Assignment 5-1 Problem Statement: Define an average function that takes 4 arguments and returns the average of the 4 numbers passed to it. Capture the 4 values in the main function and pass them to the function. Call the average function from main. Print the results returned in the main function. Call the average() function four times using a while loop with sets of four numbers and return the results back to the caller. Save the return values in variables in main(). Pass all four return values saved in main() back to the average function as arguments to calculate the average of the averages and return the result to main() which will print the final result ( average of the averages). Note: All average calculations, including average-of-averages must call the same average() function which returns the result to main().
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
