Code for assignments in CS120 - Programming 1