My homework for intro to CS