Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions