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 D list.
If the state is invalid, end the program.
Use an efficient sentinelcontrolled 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 #: Invalid StateSample #: Illustrating invalid product identificationEnter quantity: cost: $Enter product id quit to end: quitShipping cost: $Grand Total: $
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
