Q2. Given two lists shown as Figure 2(a). The first list is a name list and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Q2. Given two lists shown as Figure 2(a). The first list is a name list and the second one is a list of dictionaries which stores the scores of two students, "Tom" and "Jerry", in three subjects "S1", "S2", and "S3". Please write python program to complete the following tasks. < name = ["Tom", "Jerry"] score = [{"S1":89, "S2":76,"S3":95},{"S1":48,"S2":96,"S3":84}] Figure 2(a) original lists a. Merge the two lists into a nested dictionary as shown in Figure 2(b) and print the dictionary.< {'Tom': {'S1': 89, 'S2': 76, 'S3': 95}, 'Jerry': {'S1': 48, 'S2': 96, 'S3': 84}} Figure 2(b) dictionary exmple< b. Print the merged dictionary line by line, and print the minimum score of each student shown as Figure2(c).< Tom S1 : 89 S2 : 76 S3: 95 The minimum score of Tom is 76 Jerry S1 : 48 S2: 96 S3 84 The minimum score of Jerry is 48 Figure 2(c) line by line output example< Q2. Given two lists shown as Figure 2(a). The first list is a name list and the second one is a list of dictionaries which stores the scores of two students, "Tom" and "Jerry", in three subjects "S1", "S2", and "S3". Please write python program to complete the following tasks. < name = ["Tom", "Jerry"] score = [{"S1":89, "S2":76,"S3":95},{"S1":48,"S2":96,"S3":84}] Figure 2(a) original lists a. Merge the two lists into a nested dictionary as shown in Figure 2(b) and print the dictionary.< {'Tom': {'S1': 89, 'S2': 76, 'S3': 95}, 'Jerry': {'S1': 48, 'S2': 96, 'S3': 84}} Figure 2(b) dictionary exmple< b. Print the merged dictionary line by line, and print the minimum score of each student shown as Figure2(c).< Tom S1 : 89 S2 : 76 S3: 95 The minimum score of Tom is 76 Jerry S1 : 48 S2: 96 S3 84 The minimum score of Jerry is 48 Figure 2(c) line by line output example<
Expert Answer:
Answer rating: 100% (QA)
Explanation In this section we begin with two distinct sets of data names which encompasses the names of students and scores which consists of diction... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Find the slopes of the curves at the given points. Sketch the curves along with their tangents at these points. r = sin 2; = /4, 3/4
-
The income statement of Toby Zed NV is presented here. Additional information: 1. Accounts receivable increased ¬200,000 during the year, and inventory decreased ¬500,000. 2. Prepaid expenses...
-
Beene Distributing is considering a project that will return $240,000 annually at the end of each year for the next six years. If Beene demands an annual return of 12% and pays for the project...
-
What is meant by the SE Process Models recursive characteristic?
-
Gonzalez Company produces one product, Olpe. Because of wide fluctuations in demand for Olpe, the Assembly Department experiences significant variations in monthly production levels. The annual...
-
Factor completely: 3x + 24x +45x
-
Goldie and Kurt want advice from your financial advising firm. They have provided the following information. They graduated from university four years ago and they have good jobs, but neither of them...
-
WeParty (a Merchant) emailed a Purchase Order form to Balloon Company (a Merchant) for 70,000 balloons "in an assortment of colors." WeParty followed that Purchase Order with an email to Balloon...
-
the structure of a microring resonator. Light propagating in the waveguide couples with the light in the microring resonator through a coupler (red shaded area). The coupler can be modeled as a beam...
-
You are considering purchasing a call option with a current stock price of $80 and an exercise price of $82, the option has 91 days to maturity (use a 365 day base), the yearly risk free rate is...
-
When a wave reflects off a higher index of refraction medium than the one it is traveling in, is the reflected wave aligned in the same or opposite orientation as the incident wave? When a wave...
-
1. Using the clock switch (or the digital clock at a visible slow rate), pulse the circuit and demonstrate the design to the instructor (either in class or using GIF screen recorder) and verify the...
-
1. Plot function Y = X'.sin(X) . At -a/2 x/2. Note: Change line color to green, with circle marker. : Limit the X and Y axis using function's max and min values. 2. If Y1 = cos(2X) Y2=tan(X) + sin(X)...
-
11. [-/5 Points] 164.444 830.222 150.222 DETAILS Using 6 rectangles and left endpoints, the area under the graph of the function f(x)=1+x from x=0 to x=8 is 131.704 138.370 23.062 Submit Answer Your...
-
Pappa's Appliances uses the periodic inventory system. Details regarding the inventory of appliances at January 1, purchases invoices during the year, and the inventory count at December 31 are...
-
Leslie and Leon Lazo are married and file a joint return for 2012. Leslie's Social Security number is 466-47-3311 and Leon's is 467-74-4451. They live at 143 Snapdragon Drive, Reno, NV 82102. For...
-
Russell (age 50) and Linda (age 45) Long have brought you the following information regarding their income and expenses for the current year. Russell owns and operates a landscaping business called...
-
Dr. George E. Beeper is a single taxpayer. He lives at 45 Mountain View Dr., Apt. 321, Spokane, WA 99210. Dr. Beeper's Social Security number is 775-88-9531. Dr. Beeper works for the Pine Medical...
-
The dissociation of phosphorus pentachloride takes place at \(250^{\circ} \mathrm{C}\) as \[ \mathrm{PCl}_{5} ightleftharpoons \mathrm{PCl}_{3}+\mathrm{Cl}_{2} \quad K_{P}=1.8 \] Calculate the...
-
The reaction for oxidation of sulphur is given by \[ \mathrm{SO}_{2}(\mathrm{~g})+\frac{1}{2} \mathrm{O}_{2}(\mathrm{~g}) ightarrow \mathrm{SO}_{3}(\mathrm{~g}) \] A mixture of sulphur dioxide and...
-
The thermal decomposition of limestone takes place as \[ \mathrm{CaCO}_{3}(\mathrm{~s}) ightleftharpoons \mathrm{CaO}(\mathrm{s})+\mathrm{CO}_{2}(\mathrm{~g}) \] Calculate the decomposition pressure...
Study smarter with the SolutionInn App