knr2: Completed exercises 1-5 and 1-6.