Question: The program completed in python should either print the name and price for a coffee add - in from the Jumpin Jive coffee shop or

The program completed in python 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. - I keep getting the following error. What am i doing wrong?
Status: FAILED!
Check: 2
Test: Add no ingredients
Reason: Unable to find '['2.00']' in the program's output.
Enter coffee add-in or XXX to quit: Order total is: $ 2.0
.
Error : AssertionError -
My code is:
# JumpinJive.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.
# Initialize variables.
NUM_ITEMS =5
# 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]
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.
foundIt = False
while addIn !="XXX":
for drink in range(NUM_ITEMS):
if addIns[drink]== addIn:
foundIt = True
print (addIns[drink], "Price is $", addInPrices[drink])
orderTotal += addInPrices[drink]
if not foundIt:
print("Sorry, we do not carry that.")
orderTotal = orderTotal
addIn = input("Enter coffee add-in or XXX to quit:")
foundIt = False
print("Order total is $", orderTotal)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!