Question: Receipt Program Develop a Python program with List and Dictionary to create a receipt Program. Show the apple names and prices from dictionary ( hint:
Receipt Program
Develop a Python program with List and Dictionary to create a receipt Program.
Show the apple names and prices from dictionary hint: use a for loop to go through the Dictionary
User will make selection based on displayed apple information, save selected Apple Name, Price, Lbs calculate subtotal to the list.
Create a loop to go through the list, display the items with item name, price, weight, subtotal and Total amount.
Create a dictionary "Apples", store these apple names key and price value in it Use a for loop to display the dictionary content.
Key Name
Value Pricelb
Fuji Apples
Honeycrisp Apples
Gala Apples
Envy Apples
Red Delicious Apples
Granny Smith Apples
Pink Lady Apples
Jazz Apples
Cosmic Crisp Apples
Opal Apples
SugarBee Apples
Golden Delicious Apples
Create a x Twodimensional list Itemsto save users selection input including Apple Name, Price, Lbs calculate subtotal, set default value to
# arr for i in rangecols for j in rangerows
Items for i in range for j in range
float
hint: Create a for loop to ask users to enter each item information, stop the loop when enter Apple name, for example, user entered following items, save these information to the list:
You need to declare a counter to record how many items selected.
Apple Name Price Lbs weight Subtotal
Fuji Apples
Envy Apples
Red Delicious Apples
Granny Smith Apples
Jazz Apples
Gala Apples
The subtotal is the result of weight x price
Create a nested for loop to go through the list, display the items with item name, price, weight, subtotal.
Create a for loop to add all subtotal values together.
Calculate Tax, Tax subtotal
Calculate Total Tax subtotal
Display Tax, 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
