This data structure contains a series of courses. For each course, there are a list of its tutorials and its enrolments.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

This data structure contains a series of courses. For each course, there are a list of its tutorials and its enrolments.

Post by answerhappygod »

This Data Structure Contains A Series Of Courses For Each Course There Are A List Of Its Tutorials And Its Enrolments 1
This Data Structure Contains A Series Of Courses For Each Course There Are A List Of Its Tutorials And Its Enrolments 1 (35.55 KiB) Viewed 40 times
This Data Structure Contains A Series Of Courses For Each Course There Are A List Of Its Tutorials And Its Enrolments 2
This Data Structure Contains A Series Of Courses For Each Course There Are A List Of Its Tutorials And Its Enrolments 2 (28.03 KiB) Viewed 40 times
This data structure contains a series of courses. For each course, there are a list of its tutorials and its enrolments. [ ] unsw_courses = { "COMP1010": { } }, }, "name": "Art of Computing", "tutorials": [ { "code": "T15A", "room": "Quad 1041" }, { "code": "T17A", "room": "ASB 111" }, { "code": "T18A", "room": "Goldstein G03" } ], } "enrollments": [ { "zid": "z1234567", "tutorial": "T15A" }, { "zid": "z7654321", "tutorial": "T17A" }, { "zid": "z1357246", "tutorial": "T15A" }, "tutorial": "T18A" } { "zid": "z2461357", "FINS1613": { ] "name": "Business Finance", "tutorials": [ ], "enrollments": [ { "zid": "z7654321", "tutorial": "M12A" }, { "zid": "z1234567", "tutorial": "M12A" }, { "zid": "z1357246", "tutorial": "H16B" } ] { "code": "M12A", "room": "ASB 302" }, { "code": "H16B", "room": "J17 G12" } "FINS1612": { "name": "Capital Markets & Institution", "tutorials": [ { "code": "T11A", "room": "ASB_111" }, { "code": "F11A", "room": "J17 G12" }, { "code": "M09A", "room": "Goldstein G03" } ], "enrollments": [ { "zid": "z1357246", "tutorial": "M09A" }, { "zid": "z7654321", "tutorial": "T11A" }, { "zid": "z1234567", "tutorial": "F11A" }, { "zid": "z2461357", "tutorial": "F11A" } ] 3
Write a function timetable (zid) that, given a student number returns the timetable of the student in the format shown in the test cell below. NOTE: Your function should still work if new courses, tutorials or enrolments were added to the above data structure- i.e. you shouldn't have any specific course or tutorial codes hardcoded in your solution. [] Use this cell to test if your function is correct. [] assert timetable('z1234567') == { "COMP1010": { "time": "T15A", "room": "Quad 1041" }, "FINS1613": { "time": "M12A", "room": "ASB 302" }, "FINS1612": { "time": "F11A", "room": "317 G12" } } assert timetable('z2461357') == { "COMP1010": { "time": "T18A", "room": "Goldstein G03" }, "FINS1612": { "time": "F11A", "room": "J17 G12" } }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply