quiz 1 & 2, parts of Programming Assignment 1