Question: Python--Please show all your work so I can understand how to do this type of problem in the future. Also can we include lots of
Python--Please show all your work so I can understand how to do this type of problem in the future. Also can we include lots of screen shots. Please and thank you.
In this exercise, we will create two parallel arrays, populate them (using a loop) and then display the results.
Create two 10 element lists. The first list is intended to contain customer names. The other list will contain the amount each customer purchased during a set period of time.
You will populate both lists with a single loop. In each iteration of the loop, the user is asked for a name and a dollar amount. Those values are assigned to incrementing elements of the list.
So in the first run of the loop, you will assign a name to the first element of one list, and a dollar amount to the first element of the second list. In the second run of the loop, you assign a name to the second element of one list, and a dollar amount to the second element of the second list.
When you are done, print a report that contains the following -- each customer's name and how much they spent. The total of all cash spent, the average of all cash spent, the largest amount spent, and the least amount spent.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
