
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
.
![Parallel Lists
Summary
In this lab, you use what you have learned about parallel lists to complete a partially completed
Python program.
The program should either print the name and price for a coffee add-in from the Jumpin' Jive
Coffee Shop or it should print the message "Sorry, we do not carry that.".
Read the problem description carefully before you begin. The data file provided for this lab
includes the necessary input statements. You need to write the part of the program that searches
for the name of the coffee add-in(s) and either prints the name and price of the add-in or prints
the error message if the add-in is not found. Comments in the code tell you where to write your
statements.
Instructions
1. Study the prewritten code to make sure you understand it.
2. Write the code that searches the list for the name of the add-in ordered by the customer.
3. Write the code that prints the name and price of the add-in or the error message, and then
write the code that prints the cost of the total order.
4. Execute the program using the following data and verify that the output is correct:
Cream
Caramel
Whiskey
chocolate
Chocolate
Cinnamon
Vanilla
JumpinJive.py
+
1 # Jumpin Java.py - This program looks up and prints t
and prices of coffee orders.
2 # Input: Interactive
3 # Output: Name and price of coffee orders or error
if add-in is not found
4
5 # Declare variables.
6 NUM_ITEMS = 5 # Named constant
7
8 # Initialized list of add-ins
9 add Ins = ["Cream", "Cinnamon", "Chocolate", "Amarett
"Whiskey"]
10
11 # Initialized list of add-in prices
12 addInPrices = [.89, .25, .59, 1.50, 1.75]
13 foundIt = False # Flag variable
14 orderTotal = 2.00 # All orders start with a 2.00 ch
15
16 # Get user input
17 addIn = input ("Enter coffee add-in or XXX to quit: "
18
19 # Write the rest of the program here.
20
> Terminal](https://content.bartleby.com/qna-images/question/ff8bc427-4dd5-458f-a0de-0d1350ec468a/555874b3-1ce0-4a78-9e52-a93705cc311e/sbdl5157_thumbnail.png)
Transcribed Image Text:Parallel Lists
Summary
In this lab, you use what you have learned about parallel lists to complete a partially completed
Python program.
The program should either print the name and price for a coffee add-in from the Jumpin' Jive
Coffee Shop or it should print the message "Sorry, we do not carry that.".
Read the problem description carefully before you begin. The data file provided for this lab
includes the necessary input statements. You need to write the part of the program that searches
for the name of the coffee add-in(s) and either prints the name and price of the add-in or prints
the error message if the add-in is not found. Comments in the code tell you where to write your
statements.
Instructions
1. Study the prewritten code to make sure you understand it.
2. Write the code that searches the list for the name of the add-in ordered by the customer.
3. Write the code that prints the name and price of the add-in or the error message, and then
write the code that prints the cost of the total order.
4. Execute the program using the following data and verify that the output is correct:
Cream
Caramel
Whiskey
chocolate
Chocolate
Cinnamon
Vanilla
JumpinJive.py
+
1 # Jumpin Java.py - This program looks up and prints t
and prices of coffee orders.
2 # Input: Interactive
3 # Output: Name and price of coffee orders or error
if add-in is not found
4
5 # Declare variables.
6 NUM_ITEMS = 5 # Named constant
7
8 # Initialized list of add-ins
9 add Ins = ["Cream", "Cinnamon", "Chocolate", "Amarett
"Whiskey"]
10
11 # Initialized list of add-in prices
12 addInPrices = [.89, .25, .59, 1.50, 1.75]
13 foundIt = False # Flag variable
14 orderTotal = 2.00 # All orders start with a 2.00 ch
15
16 # Get user input
17 addIn = input ("Enter coffee add-in or XXX to quit: "
18
19 # Write the rest of the program here.
20
> Terminal
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images

Knowledge Booster
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.Similar questions
- The liquid-liquid extraction process carried out at the Electrochemical Materials Laboratory involves the extraction of nickel (Ni) from the liquid phase into an organic phase. Data from laboratory experiments are given in the table below. Ni phase cair, a (gr/l) 2 2,5 3 Ni phase organik, g (gr/l) 8,57 10 12 Assume that a is the amount of Ni in the liquid phase, and g is the amount of Ni in the organic phase. Quadratic interpolation is used to estimate the value of g, which is given by the following formula: g = x1a? + x2a + x3 a. Find three simultaneous equations based on the data given by the experimental results. b. Use the Gauss Elimination method to get the values of x1, x2 and x3 and then estimate the amount of Ni in the organic phase, if 2.3 g/l of Ni is available in the liquid phase. c. Use the LU Decomposition method to get the values of x1, x2 and x3. and then estimate the amount of Ni in the organic phase, if 2.3 g/l of Ni is available in the liquid phase.arrow_forward25.arrow_forwardthe question is required handwrittenarrow_forward
- PROBLEM 4 Translate each of the following English statements into logical expressions. The domain of discourse is the set of all real mumbers. (a) The reciprocal of every positive mumber less than one is greater than one. (b) There is no smallest mumber. (c) Every number other than 0 has a multiplicative inverse.arrow_forwardComputer Science 19. Find the fourth-degree polynomial y(x) that passes through the points (0, 1), (0.75, −0.25), and (1, 1) and has zero curvature at (0, 1) and (1, 1) (Must be solved using python 3)arrow_forward(1 point) Alice and Bob are conducting Diffie-Hellman key exchange with the parameters p = 67 and a = and Bob selects private key b = 55. 2. Suppose Alice selects private key a = 25 a) What is Alice's public key? b) What is Bob's public key? c) What is the shared secret?arrow_forward
- 5:10 Question 4 of 15 .5G Which of the following describes the entropy change in the given reaction? 2 Cl₂O(g) → 2 Cl₂(g) + 7 O₂(g) Submit A) The entropy change is negative because a larger molecule (Cl₂O₂) is converted into two smaller molecules (Cl₂ and O₂). B) The entropy change is zero because the reactants and products are all gases. C) The entropy change cannot be determined because the temperature is not specified. D) The entropy change is negative because there are more moles of products than reactants. Tap here or pull up for additional resources E) The entropy change is positive because there are more moles of products than reactants.arrow_forward(1 point) Note: The notation from this problem is from Understanding Cryptography by Paar and Pelzl. We conduct a known-plaintext attack against an LFSR. Through trial and error we have determined that the number of states is m = = 4. The plaintext given by 11101101 = x0x1x2X3 X4 X5 X6 X 7 when encrypted by the LFSR produced the ciphertext 10000000 = YoY1Y2Y3Y3Y5Y6Y7. What are the tap bits of the LFSR? Please enter your answer as unspaced binary digits (e.g. 0101 to represent P3 = 0, P2 = 1,p1 = 0, po = 1).arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education