Question: Processing: Ask for the customer name and state. Compute the row index for the 2 D list. If the state is invalid, end the program.

Processing:
Ask for the customer name and state. Compute the row index for the 2D list.
If the state is invalid, end the program.
Use an efficient sentinel-controlled loop to read product identifications until the user wishes to quit.
If the product id is not found in the dictionary report an error.
Otherwise:
Report the style, color, size, unit price and stock in a neat chart
Ask the user for quantity
If the quantity is larger than stock report and error message
Otherwise:
Add quantity to total number of shirts purchased.
Compute and report cost as quantity times unit price.
Edit the record by subtracting quantity from stock and write back to dictionary
Compute shipping cost from state and total number of shirts purchased.
Report shipping cost.
Report grand total cost.
Sample #1: Invalid StateSample #2: Illustrating invalid product identificationEnter quantity: 1cost: $28.00Enter product id (quit to end): quitShipping cost: $5.00Grand Total: $33.00
Processing: Ask for the customer name and state.

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 Programming Questions!