Question: This is a list within a list problem. Write a Python program to do the following:Calculate the average for a list of numbersUse a for
This is a list within a list problem. Write a Python program to do the following:Calculate the average for a list of numbersUse a for loop to iterate through the weeklysales list, and calculate the average sales number and printthe name of the sales person followed by the average.Here is the sales summary to use as input:weeklysales John Sellall', Sarah Marketer', Frank Deal', Bill Discount', Betty Budget', Charles Closing', Your output should look like this:John Sellall Sarah Marketer Frank Deal Bill Discount Betty Budget Charles Closing Basically all you need is a for loop that loops through weeklysales, gets the average and prints the name and the average. You can use sum, len, and round to do that.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
