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 weekly_sales 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:weekly_sales =[['John Sellall', [10000,9250,1900,8009,8059,7500]],['Sarah Marketer', [9990,9120,6100,10000,8500,9900]],['Frank Deal', [7500,7055,10000,8020,8500,9100]],['Bill Discount', [9500,7000,1100,8500,9000,7050]],['Betty Budget', [10000,10000,11100,12000,10000,9900]],['Charles Closing', [8800,8500,8370,9000,7900,9100]]]Your output should look like this:John Sellall 7453Sarah Marketer 8935Frank Deal 8362Bill Discount 7025Betty Budget 10500Charles Closing 8612Basically all you need is a for loop that loops through weekly_sales, 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!