is lab, you use what you have learned about parallel lists to complete a partially completed on program. program should either print the name and price for a coffee add-in from the Jumpin' Jive e Shop or it should print the message "Sorry, we do not carry that.". the problem description carefully before you begin. The data file provided for this lab des the necessary input statements. You need to write the part of the program that searches he name of the coffee add-in(s) and either prints the name and price of the add-in or prints error message if the add-in is not found. Comments in the code tell you where to write your ments. ructions tudy the prewritten code to make sure you understand it. Write the code that searches the list for the name of the add-in ordered by the customer. 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. xecute the program using the following data and verify that the output is correct: Cream Caramel Whiskey chocolate Chocolate Cinnamon 2 # Input: 3 # Output: if add-in is not found Interactive Name and price of coffee orders or error 4 5 # Declare variables. 6 NUM_ITEMS = 5 # Named constant 7 8 # Initialized list of add-ins 9 addIns = ["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

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

 

O. you where to compose your assertions. Directions 1. Study the prewritten code to ensure you figure out it. 2. Compose the code that scans the rundown for the name of the include requested by the client. 3. Compose the code that prints the name and cost of the add-in or the mistake message, and afterward compose the code that prints. 

 

mmary
his lab, you use what you have learned about parallel lists to complete a partially completed
hon program.
program should either print the name and price for a coffee add-in from the Jumpin' Jive
fee Shop or it should print the message "Sorry, we do not carry that.".
d the problem description carefully before you begin. The data file provided for this lab
udes the necessary input statements. You need to write the part of the program that searches
the name of the coffee add-in(s) and either prints the name and price of the add-in or prints
error message if the add-in is not found. Comments in the code tell you where to write your
cements.
=tructions
Study the prewritten code to make sure you understand it.
Write the code that searches the list for the name of the add-in ordered by the customer.
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.
Execute the program using the following data and verify that the output is correct:
Cream
Caramel
Whiskey
chocolate
Chocolate
Cinnamon
Vanilla
1 # Jumpin Java.py - This program looks up and prints t
and prices of coffee orders.
Interactive
2 # Input:
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 addIns = ["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
Transcribed Image Text:mmary his lab, you use what you have learned about parallel lists to complete a partially completed hon program. program should either print the name and price for a coffee add-in from the Jumpin' Jive fee Shop or it should print the message "Sorry, we do not carry that.". d the problem description carefully before you begin. The data file provided for this lab udes the necessary input statements. You need to write the part of the program that searches the name of the coffee add-in(s) and either prints the name and price of the add-in or prints error message if the add-in is not found. Comments in the code tell you where to write your cements. =tructions Study the prewritten code to make sure you understand it. Write the code that searches the list for the name of the add-in ordered by the customer. 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. Execute the program using the following data and verify that the output is correct: Cream Caramel Whiskey chocolate Chocolate Cinnamon Vanilla 1 # Jumpin Java.py - This program looks up and prints t and prices of coffee orders. Interactive 2 # Input: 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 addIns = ["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
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY