Question: def filter_by_prereqs (students: Dict [str, List [str]], Courses info: PrereqDict, Course_name: str) -> None: Given a dictionary mapping all the students enrolled in a course
![def filter_by_prereqs (students: Dict [str, List [str]], Courses info: PrereqDict, Course_name:](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/10/670fe3b1b9100_577670fe3b1a51d3.jpg)
def filter_by_prereqs (students: Dict [str, List [str]], Courses info: PrereqDict, Course_name: str) -> None: Given a dictionary mapping all the students enrolled in a course to the list of courses they took, modify the dictionary such that it only has students who have the prerequisites for the course Courses info = {'CCT110H53: [ CCT10915' ]} students = { Naaz': ['CSC108H5', 'MAT102H5'], "Haocheng' : [' CSC10815' ' CCT109H5' ]} filter_by_prereqs (students, courses_info, 'CCT11015' ) students { Haocheng' : ['CSC108H5', 'CCT109H5' ]} passed = set ()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
