Write the program in Python Ms. Binny went to the automated Bins Supermarket where, on entering the supermarket, one views the produce on a screen and selects the bin number of the bin containing the desired produce and then enters the quantity of the produce desired. After selecting everything that is needed, the shopper proceeds to the check out where the bill and the selected bagged produce are ready. Write a Python program that given the two lists as shown below, produce and prices, where the price of the produce is listed at the corresponding index to the produce bin/name (for example, the bag of carrots is listed at index 0 in the produce list and the price of the bag of carrots is listed at index 0 in the prices list) produce = ["Bin 1: Bag of Apples", "Bin 2: Banana Bunch", "Bin 3: Pears", "Bin 4: Bag of Carrots", "Bin 5: Cauliflower", "Bin 6: Broccoli", "Bin 7: Red Bell Pepper", "Bin 8: Green Onions", "Bin 9: Packaged Okra", "Bin 10: Oranges"] prices = [5.50, 2.60, 0.80, 3.25, 3.99, 3.35, 1.35, 1.10, 4.50, 0.80] shows the shopper their options and then obtains from the shopper the bin numbers and the quantities of the produce they wish to purchase (both the bin number and quantity are integers), computes the cost of the produce bought, appends the three pieces of information in a new list called shoppingCart which holds the bin number followed by the quantity and then the cost of the produce for each item purchased, and creates and prints the bill as shown in the output, including the total Sample input/output is as follows: Bin 1: Bag of Apples {$5.50} Bin 2: Banana Bunch {$2.60} Bin 3: Pears {$0.80} Bin 4: Bag of Carrots {$3.25} Bin 5: Cauliflower {$3.99} Bin 6: Broccoli {$3.35} Bin 7: Red Bell Pepper {$1.35} Bin 8: Green Onions {$1.10} Bin 9: Packaged Okra {$4.50} Bin 10: Oranges {$0.80} Do you wish to start filling your shopping cart? (yes/done) yes Enter the bin number (e.g., enter 3 for Pears): 4 Enter the quantity of the selected produce: 2 Do you wish to continue shopping? (yes/done) yes Enter the bin number (e.g., enter 3 for Pears): 8 Enter the quantity of the selected produce: 5 Do you wish to continue shopping? (yes/done) yes Enter the bin number (e.g., enter 3 for Pears): 6 Enter the quantity of the selected produce: 1 Do you wish to continue shopping? (yes/done) done Bin Num Quantity Total Cost 4 2 6.50 8 5 5.50 6 1 3.35 The total bill is $ 15.35
Write the program in Python
Ms. Binny went to the automated Bins Supermarket where, on entering the supermarket, one views the produce on a screen and selects the bin number of the bin containing the desired produce and then enters the quantity of the produce desired. After selecting everything that is needed, the shopper proceeds to the check out where the bill and the selected bagged produce are ready.
Write a Python program that
-
given the two lists as shown below, produce and prices, where the price of the produce is listed at the
corresponding index to the produce bin/name (for example, the bag of carrots is listed at index 0 in the produce list and the price of the bag of carrots is listed at index 0 in the prices list)
produce = ["Bin 1: Bag of Apples", "Bin 2: Banana Bunch", "Bin 3: Pears", "Bin 4: Bag of Carrots", "Bin 5: Cauliflower", "Bin 6: Broccoli", "Bin 7: Red Bell Pepper", "Bin 8: Green Onions", "Bin 9: Packaged Okra", "Bin 10: Oranges"] prices = [5.50, 2.60, 0.80, 3.25, 3.99, 3.35, 1.35, 1.10, 4.50, 0.80] -
shows the shopper their options and then obtains from the shopper the bin numbers and the quantities of the produce they wish to purchase (both the bin number and quantity are integers),
-
computes the cost of the produce bought, appends the three pieces of information in a new list called shoppingCart which holds the bin number followed by the quantity and then the cost of the produce for each item purchased, and
-
creates and prints the bill as shown in the output, including the total
Sample input/output is as follows:
Bin 1: Bag of Apples {$5.50} Bin 2: Banana Bunch {$2.60} Bin 3: Pears {$0.80}
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)