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.

Cite this work

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}
}

Working with relational operators

Implement a program that asks the user for a relational operator (<, <=, >, >=, ==, !=) and 2 values. Your program has to display on screen the result (True or False) of the given operation applied to the two values.

You can design the layout of the input and output of your program as you want. Run the following test cases to test the operation of your program:

test case ID inputs     expected output
  operator value1 value2  
1 < 12 4 False
2 > 100 40 True
3 == "Hello!" 40 False
4 != 100 "Python" True
5 >= 98.67 0.45 True
6 <= -100 40 True
7 < 24 "24K" True
8 >= "email" "correo" True
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 this is not only for numerical values.