# Note: "pass" doesn't do anything, it's just a placeholder. # Delete pass when you add your code. # Display all items in cart with prices and total def display_cart(cart): # TODO: Show numbered list of items # TODO: Calculate and show total pass # Add item to cart or update if exists def add_to_cart(cart, item, price): # TODO: Check if item exists # TODO: Add or update price # TODO: Return True if successful pass # Remove item by position number def remove_from_cart(cart, item_number): # TODO: Convert display number to actual position # TODO: Remove item and return its price pass # Calculate total price of all items def calculate_total(cart): # TODO: Sum all prices in cart pass # Main program def main(): cart = {} # Empty dictionary to store items and prices while True: # TODO: Show menu # TODO: Get user choice # TODO: Handle each menu option pass main()