We need to modularize the code. We need to write functions which return particular semester's or subject's attendance.