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. 1. Create a dictionary "Apples", store these 12 apple names (key) and price (value) in it. Use a for loop to display the dictionary content. Key (Name) Value (Price/lb) Fuji Apples 0.94 Honeycrisp Apples 1.54 Gala Apples 0.84 Envy Apples 1.60 Red Delicious Apples 1.00 Granny Smith Apples 1.06 Pink Lady Apples 0.99 Jazz Apples 0.99 Cosmic Crisp Apples 1.18 Opal Apples 0.87 SugarBee Apples 2.27 Golden Delicious Apples 1.24 2. Create a 12 x 4 Two-dimensional list “Items”to save user’s selection input including Apple Name, Price, Lbs, calculate subtotal, set default value to 0. # arr = [[0 for i in range(cols)] for j in range(rows)] Items = [[0 for i in range(4)] for j in range(12)] float( ) (hint: Create a for loop to ask users to enter each item information, -1 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



Answer :

Other Questions