# Dictionary to map topping choices to names and costs topping_menu = { "1": ("Cheese sauce", 1.50), "2": ("Pesto sauce", 1.50), "3": ("Marinara", 0.00), # Marinara is free "4": ("Barbeque", 1.50), "5": ("Mozzarella Cheese", 1.50), "6": ("Ground beef", 3.50), "7": ("Smoked ham", 3.50), "8": ("Pepperoni", 3.50), "9": ("Onion", 2.00), "10": ("Olives", 2.00), "11": ("Spinach", 2.00), "12": ("Spring Onion", 1.00), "13": ("Premium Italian Sausage", 5.50), "14": ("Smoked Bacon", 3.50), "15": ("Slow cooked lamb", 5.50), "16": ("Camembert cheese", 3.50), "17": ("Capsicum", 4.50) } # Toppings selection process chosen_toppings = [] total_cost = 0.0 while True: topping_choice = input("Enter the number of the topping you would like to add (or enter 'done' if finished): ").strip().lower() if topping_choice == "done": break elif topping_choice in topping_menu: topping_name, cost = topping_menu[topping_choice] total_cost += cost chosen_toppings.append(topping_name) print(f"{topping_name} added. Current total: ${total_cost:.2f}") else: print("Sorry, please enter a number from the menu.") # Display chosen toppings and total cost if chosen_toppings: print("\nChosen toppings:") for topping in chosen_toppings: print(f"- {topping}") print(f"\nTotal cost for toppings: ${total_cost:.2f}\n") else: print("\nNo toppings selected.\n")