Question: Consider the following incomplete code and determine what should replace the question marks so that the value of a can be calculated in the
Consider the following incomplete code and determine what should replace the question marks so that the value of a can be calculated in the second for loop: 123 Answer: 2 4567 8 9 18 D123 11 fruits = ["Apple", "Melon", "Orange", "Pomegranate"] fruit_price = (("Melon", 2.50), ("Pomegranate", 1.10), ("Apple", 0.35), ("Orange", 8.45)) d = {} 13 for x, y in fruit_price: ???? a = 0 for i in fruits: a += d[i] 12 a /= len(fruits) Type your answer in the answer box below. Note: Make sure the correct PEP 8 Pythonic style conventions.
Step by Step Solution
3.48 Rating (151 Votes )
There are 3 Steps involved in it
Answer To complete the code and calculate the value of a in the second for loop you ... View full answer
Get step-by-step solutions from verified subject matter experts
