def get_student_courses(self, student_id: int) -> list:
l4 = [] # List to store course codes for the student
l5 = [] # List to store course names
r7 = pd.read_csv('enroll.csv') # Read the enroll CSV
r8 = pd.read_csv('courses.csv') # Read the courses CSV
# Loop through enrolled courses to find courses for the student
for i, j in zip(r7['student_id'].values, r7['course_code'].values):
if i == student_id:
l4.append(j) # Append the course code
# Loop through course codes to find corresponding course names
for x in l4:
if x in r8['code'].values:
y = r8[r8['code'] == x] # Filter courses for the current code
l5.append(y['name'].values) # Extend name list with the found names
return l5 # Return list of course namesget_most_popular_course()
ZGVmIGdldF9zdHVkZW50X2NvdXJzZXMoc2VsZiwgc3R1ZGVudF9pZDogaW50KSAtPiBsaXN0OgogICAgICAgIGw0ID0gW10gICMgTGlzdCB0byBzdG9yZSBjb3Vyc2UgY29kZXMgZm9yIHRoZSBzdHVkZW50CiAgICAgICAgbDUgPSBbXSAgIyBMaXN0IHRvIHN0b3JlIGNvdXJzZSBuYW1lcwogICAgICAgIHI3ID0gcGQucmVhZF9jc3YoJ2Vucm9sbC5jc3YnKSAgIyBSZWFkIHRoZSBlbnJvbGwgQ1NWCiAgICAgICAgcjggPSBwZC5yZWFkX2NzdignY291cnNlcy5jc3YnKSAgIyBSZWFkIHRoZSBjb3Vyc2VzIENTVgoKICAgICAgICAjIExvb3AgdGhyb3VnaCBlbnJvbGxlZCBjb3Vyc2VzIHRvIGZpbmQgY291cnNlcyBmb3IgdGhlIHN0dWRlbnQKICAgICAgICBmb3IgaSwgaiBpbiB6aXAocjdbJ3N0dWRlbnRfaWQnXS52YWx1ZXMsIHI3Wydjb3Vyc2VfY29kZSddLnZhbHVlcyk6CiAgICAgICAgICAgIGlmIGkgPT0gc3R1ZGVudF9pZDoKICAgICAgICAgICAgICAgIGw0LmFwcGVuZChqKSAgIyBBcHBlbmQgdGhlIGNvdXJzZSBjb2RlCgogICAgICAgICMgTG9vcCB0aHJvdWdoIGNvdXJzZSBjb2RlcyB0byBmaW5kIGNvcnJlc3BvbmRpbmcgY291c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