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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education