Question: Python problem: Create a point of sale machine that contains the following items and their respective prices: Item Price Shirt 10 Pants 15 Sweater 20

Python problem:

Create a point of sale machine that contains the following items and their respective prices:

Item Price
Shirt 10
Pants 15
Sweater 20
Socks 5
Hat 7

Each item should be kept inside of a dictionary along with its price. The program should list out the items and allow the user to type in what item theyd like to purchase. If the item doesnt exist, the program should tell the user it doesnt exist. If the item does exist then the program should keep a running total of all items selected and add the price of the item to the total (IE, if you choose Shirt your total is 10, if you then choose Hat your total is 17, etc). The total should be printed out after each addition.

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