In this program you will implement an online shopping cart using a Python list of dictionary. The dictionary will contain the product name, price and quantity.
The program should loop continually, asking the user to enter
until the user enters a product name of 'checkout'
at which time the loop should break.
Each time through the loop you should create a dictionary of product name, product price and product quantity then add the dictionary to a list.
After you enter 'checkout'
the program should show:
NOTE: Don't worry about handling bad inputs for this exercise.
Example Run:
E-Commerce Shopping Cart
Enter product name or 'checkout':pencil
Enter pencil Price:0.99
Enter pencil Quantity:10
Enter product name or 'checkout':calculator
Enter calculator Price:9.99
Enter calculator Quantity:1
Enter product name or 'checkout':checkout
pencil 10 $0.99
calculator 1 $9.99
TOTAL: $19.89
Start out your program by writing your TODO list of steps you'll need to solve the problem!
In [2]:
# STEP 2: Write code
Reflect upon your experience completing this assignment. This should be a personal narrative, in your own voice, and cite specifics relevant to the activity as to help the grader understand how you arrived at the code you submitted. Things to consider touching upon: Elaborate on the process itself. Did your original problem analysis work as designed? How many iterations did you go through before you arrived at the solution? Where did you struggle along the way and how did you overcome it? What did you learn from completing the assignment? What do you need to work on to get better? What was most valuable and least valuable about this exercise? Do you have any suggestions for improvements?
To make a good reflection, you should journal your thoughts, questions and comments while you complete the exercise.
Keep your response to between 100 and 250 words.
--== Write Your Reflection Below Here ==--
In [ ]:
# RUN THIS CODE CELL TO TURN IN YOUR WORK!
from ist256.submission import Submission
Submission().submit()