Question: Question 1 : ( 1 0 Marks ) Lists Create a list named vegetables containing the following items: 'carrot', 'broccoli', 'spinach', 'potato'. Write a code
Question : Marks
Lists
Create a list named vegetables containing the following items: 'carrot', 'broccoli', 'spinach', 'potato'.
Write a code to display vegetables in the list that start with the letter
Dictionaries
Create a dictionary named classscores where each key is a student's name, and each value is a nested dictionary containing subject names as keys and scores as values. Initially, add the following data for each student:
"Eve": Math Physics Chemistry
"Frank": Math Chemistry Biology
"Grace": Physics Chemistry Math
Write a function updatescoreclassscores, student, subject, score that:
Adds a new subject with the score if the subject does not already exist for the student.
Updates the score only if the new score is higher than the existing one.
Use this function to:
Update Eve's Math score to
Add English with a score of for Frank
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
