Code from assignments in Semester 1