Question: ( e ) ( 1 0 Pts ) [ Task - 5 ] Imagine a dictionary with the structure student _ id: [ student _
e PtsTask Imagine a dictionary with the structure studentid:studentmajor, studentcgpa Assume majors are represented by strings like 'CoE', 'EEE', etc. Now define a function avgcgpabymajor that takes such a dictionary and a string for major as inputs and returns the average cgpa for all students with that major.
Sample inputOutput:
In::::
printavgcgpabymajorIn"CoE"
f PtsTask Define a function called searchdict which will take a dictionary and a number as arguments. It will search through dictionary's values, and return True if that number appears in the dictionary as an integer or as a string
Sample inputOutput:
'Ahmet': 'Zeynep': Mehmet:
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
