Test Informed Learning with Examples

Logo

Repository with assignments using the Test Informed Learning with Examples (TILE) method to integrate testing into existing programming courses for free.

Menu

LinkedIN Community

Join our LinkedIN Community.

Multiples of seven

Write a program that receives an integer \(N\) and generates all the multiples of 7 between 1 and \(N\). Run the following test cases to test your program:

test case ID inputs expected outputs
1 0 there are no multiples of 7
2 3 there are no multiples of 7
3 -5 there are no multiples of 7
4 -15 -7, -14
5 18 7, 14
6 57 7, 14, 21, 28, 35, 42, 49, 56
Insist that the students test their programs by giving them example
test cases in a table. Again the chosen values will make them aware
that there program should also work for negative numbers.