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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started