Repository with assignments using the Test Informed Learning with Examples (TILE) method to integrate testing into existing programming courses for free.
Join our LinkedIN Community.
Use the following BibTeX entry to cite this work:
@INPROCEEDINGS{DVMB2023, author={Doorn, Niels and Vos, Tanja and MarĂn, Beatriz and Barendsen, Erik}, booktitle={2023 IEEE Conference on Software Testing, Verification and Validation (ICST)}, title={Set the right example when teaching programming: Test Informed Learning with Examples (TILE)}, year={2023}, volume={}, number={}, pages={269-280}, doi={10.1109/ICST57152.2023.00033} }
Write a program that reads an integer number and tells whether it is odd or even. Run the following examples to test that your program gives the same outputs:
>>> %Run
Enter an integer number: 1
The number 1 is odd
>>> %Run
Enter an integer number: 0
The number 0 is even
>>> %Run
Enter an integer number:111
The number 1 is odd
>>> %Run
Enter an integer number: 23
The number 23 is odd
>>> %Run
Enter an integer number: -34
The number 0 is even
>>> %Run
Enter an integer number: -11
The number -11 is odd
Insist that the students test their programs by giving them example
test executions.