Question: Lab Challenge Writing Code: To your left, you should see an opened file called lab_challenge.py. Use this file and reference the syntax below to work

Lab Challenge Writing Code: To your left, youLab Challenge Writing Code: To your left, youLab Challenge Writing Code: To your left, youLab Challenge Writing Code: To your left, youLab Challenge Writing Code: To your left, you
Lab Challenge Writing Code: To your left, you should see an opened file called lab_challenge.py. Use this file and reference the syntax below to work on the Lab Challenge. Lab Challenge A restaurant critic has to rate each dish on the menu at King's Restaurant. Included in the drop-down menu below is the menu served at King's Restaurant. King's Restaurant Menu Included in the table below is the data the restaurant critic used to calculate their overall rating of King's Restaurant. Each row on the table represents a menu item and each column on the table represents one of the following rating measurements used by the restaurant critic as listed in the drop-down menu below called "Key to Table". Key to Table Release Dish Dish Dish Dish Cost . . Rating year type weight taste surprise value Food Sampler 2019 Appetizer 8 4 0 2 4375 Antipasto 2022 Appetizer 8 4 2 Platter 4.6875 Zuchinni 2022 Appetizer 4 0 5 Sticks 3.75 Garlic 2016 5 6 4 Bread Appetizer 0 4.6875 Bruschetta 2016 Trio Appetizer 7 2 8 7.8125 Stuffed Portabella 2018 Appetizer 5 4 8 5.625 Eggplant Parm 2020 Sandwich 8 4 0 6 5.625 Sandwich Chick'n Caesar 2018 Sandwich 7 10 1 9 8.4375 Wrap Italian 2016 Sandwich 10 7 0 Deli 10 8.4375 Activate Windows Go to Settings to activate Windows. Classic 2021 Sandwich 9 7 Burger O 10 8.125Meatball on a 2016 Sandwich 9 6 7 6.875 Ciabatta Chick'n 2016 Entree 9 7 Parmesan 6 6.875 Eggplant 7 Parmesan 2018 Entree 4 0 6 5.3125 Lasagna 2019 Entree 8 10 2 9 9.0625 Spaghetti & 2019 Entree 8 8 O 10 8.125 Meatballs Tiramisu 2016 Dessert 3 9 2 10 7.5 Cannoli 2019 Dessert 3 9 2 4.6875 Chocolate 2019 Cake Dessert 4 8 O 6 5.625 Chocolate Almond 2022 Dessert 5 10 2 4 6.5625 CroissantWe can create a tuple to represent the key for our data as shown below. ating_key = ( 'Food, 'Release year', 'Dish type', 'Dish weight', 'Dish taste', 'Dish 5 Lab Challenge: Prompt 1 E sampler = (2019, 'Appetizer', 8, 4, 0, 2, 4.375) antipasto_platter = (2022, 'Appetizer' , 8, 4, 1, 2, 4.6875) zuchini_sticks = (2022, 'Appetizer' , 4, 3, 0, 5, 3.75) garlic_bread = (2016, 'Appetizer' , 5, 6, 0, 4, 4.6875) bruschetta_trio = (2016, 'Appetizer' , 7, 8, 2, 8, 7.8125) stuffed_portabella = (2018, 'Appetizer' , 5, 4, 1, 8, 5.625) eggplant_parm_sandwich = (2020, 'Sandwich', 8, 4, 0, 6, 5.625) chick_n_caesar_wrap = (2018, 'Sandwich' , 7, 10, 1, 9, 8.4375) italian_deli = (2016, 'Sandwich', 10, 7, 0, 10, 8.4375) classic_burger = (2021, 'Sandwich' , 9, 7, 0, 10, 8.125) meatball_on_a_ciabatta = (2016, 'Sandwich', 9, 6, 0, 7, 6.875) chick_n_parmesan = (2016, 'Entree', 9, 7, 0, 6, 6.875) eggplant_parmesan = (2018, 'Entree' , 7, 4, 0, 6, 5.3125) lasagna = (2019, 'Entree' , 8, 10, 2, 9, 9.0625) spaghetti_meatballs = (2019, 'Entree', 8, 8, 0, 10, 8.125) tiramisu = (2016, 'Dessert', 3, 9, 2, 10, 7.5) cannoli = (2019, 'Dessert' , 3, 9, 1, 2, 4.6875) chocolate_cake = (2019, 'Dessert' , 4, 8, 0, 6, 5.625) Activate Windows chocolate_almond_croissant = (2022, 'Dessert', 5, 10, 2, 4, 6.5625)Settings to activate Windows.Given each tuple in the code shown above,... 1. Create a new tuple called ' a1l menu_items which represents each tuple nested as a subtuple. An example is shown below. ({2819, 'Appetizer', 8, 4, 8, 2, 4.375), (2822, 'Appetizer', 8, 4, 1, 2, 4.68] 2. Create a new tuple called menu_item ratings which represents each menu item's rating. 3. Create a variable called | average menu_item rating to compute the overall rating of all dishes by using the | sum | and | 1len function, rounding the solution to the nearest fourth decimal place. The expected output: A1l Menu Items: ((2819, 'Appetizer?, 8, 4, @, 2, 4.375), (2822, 'Appetizer?, 8, 4, Menu ITtem Ratings: (4.375, 4.6875, 3.75, 4.6875, 7.8125, 5.625, 5.625, 8.4375, 8.43 Average Menu Item Rating: 6.4389

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 Accounting Questions!