paired programming. using while andfor loops