Skip to content
Perform the indicated operations.(8×7 – 8×5) + (2×7 – 6×5 -…
Questions
Reаd the fоllоwing cоde thаt processes student grаdes from a file. Identify ALL line numbers that contain errors and briefly explain what is wrong with each line. 1. class Pizza:2. menu_items = []3. total_orders = 04. 5. def __init__(self, size, toppings):6. self.size = size7. self.toppings = toppings8. 9. @staticmethod10. def calculate_price(size):11. prices = {"small": 8, "medium": 12, "large": 16}12. return prices.get(size, 0) * self.discount13. 14. @classmethod15. def add_to_menu(name, price):16. cls.menu_items.append({"name": name, "price": price})17. 18. @classmethod19. def get_total_orders(cls):20. return Pizza.total_orders21. 22. @staticmethod23. def is_valid_size(size):24. return size in ["small", "medium", "large"]25. 26. pizza1 = Pizza("large", ["pepperoni", "cheese"])27. print(Pizza.calculate_price("medium"))28. Pizza.add_to_menu("Margherita", 10)