Methods and recursion homeworks 1 & 2