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.
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.
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...
Related questions
Question
![Parallel Lists
JumpinJive.py
>- Terminal
Summary
1 # JumpinJava.py - This program looks up and prints t
and prices of coffee orders.
2 # Input:
In this lab, you use what you have learned about parallel lists to complete a partially completed
Interactive
Python program.
3 # Output:
Name and price of coffee orders or error
if add-in is not found
4
The program should either print the name and price for a coffee add-in from the Jumpin' Jive
5 # Declare variables.
Coffee Shop or it should print the message "Sorry, we do not carry that.".
6 NUM_ITEMS = 5 # Named constant
8 # Initialized list of add-ins
9 addIns = ["Cream", "Cinnamon", "Chocolate", "Amarett
"Whiskey"]
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
10
the error message if the add-in is not found. Comments in the code tell you where to write your
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
15
'16 # Get user input
17 addIn = input(
statements.
# All orders start with a 2.00 ch
Instructions
1. Study the prewritten code to make sure you understand it.
coffee add-in or XXX to quit: "
18
2. Write the code that searches the list for the name of the add-in ordered by the customer.
19 # Write the rest of the program here.
3. Write the code that prints the name and price of the add-in or the error message, and then
20
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5b4afaba-eeab-4f16-8fe3-57d1f7966dfc%2Fcfbba015-0a23-45ad-a77c-69cf9c2acab7%2F03v85g_processed.png&w=3840&q=75)
Transcribed Image Text:Parallel Lists
JumpinJive.py
>- Terminal
Summary
1 # JumpinJava.py - This program looks up and prints t
and prices of coffee orders.
2 # Input:
In this lab, you use what you have learned about parallel lists to complete a partially completed
Interactive
Python program.
3 # Output:
Name and price of coffee orders or error
if add-in is not found
4
The program should either print the name and price for a coffee add-in from the Jumpin' Jive
5 # Declare variables.
Coffee Shop or it should print the message "Sorry, we do not carry that.".
6 NUM_ITEMS = 5 # Named constant
8 # Initialized list of add-ins
9 addIns = ["Cream", "Cinnamon", "Chocolate", "Amarett
"Whiskey"]
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
10
the error message if the add-in is not found. Comments in the code tell you where to write your
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
15
'16 # Get user input
17 addIn = input(
statements.
# All orders start with a 2.00 ch
Instructions
1. Study the prewritten code to make sure you understand it.
coffee add-in or XXX to quit: "
18
2. Write the code that searches the list for the name of the add-in ordered by the customer.
19 # Write the rest of the program here.
3. Write the code that prints the name and price of the add-in or the error message, and then
20
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
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 now
This is a popular solution!
Step by step
Solved in 3 steps with 8 images

Recommended textbooks for you

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY