Page 1 of 1

# JumpinJava.py - This program looks up and prints the names and prices of coffee orders. # Input: Interactive # Output

Posted: Tue Jul 12, 2022 8:14 am
by answerhappygod
# JumpinJava.py - This program looks up and prints the names and prices of coffee orders.
# Input: Interactive
# Output: Name and price of coffee orders or error message if add-in is not found
# Declare variables.
NUM_ITEMS = 5 # Named constant
# Initialized list of add-ins
addIns = ["Cream", "Cinnamon", "Chocolate", "Amaretto", "Whiskey"]
# Initialized list of add-in prices
addInPrices = [.89, .25, .59, 1.50, 1.75]
foundIt = False # Flag variable
orderTotal = 2.00 # All orders start with a 2.00 charge
# Get user input
addIn = input("Enter coffee add-in or XXX to quit: ")
# Write the rest of the program here.
In this lab, you use what you have learned about parallel liststo complete a partially completed Python program.
The program should either print the name and price for a coffeeadd-in from the Jumpin’ Jive Coffee Shop or it should print themessage "Sorry, we do not carry that.".
Read the problem description carefully before you begin. Thedata file provided for this lab includes the necessary inputstatements. You need to write the part of the program that searchesfor the name of the coffee add-in(s) and either prints the name andprice of the add-in or prints the error message if the add-in isnot found. Comments in the code tell you where to write yourstatements.
Instructions