AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Test it properly

Week 14 · 1.7 Software development · 3 lessons
Answers are for parents and teachers.
1
Trace this program and say what is printed.
Python
1n = 2
2if n > 1:
3    n = n + 5
4if n > 6:
5    n = n - 1
6print(n)
2
A game accepts player numbers from 2 to 4. Write one normal value, the boundary values, and one invalid value.
3
A program says Open when hours >= 9 and hours <= 17. It is tested with 17. What is the expected outcome, and what type of test is it?
4
Explain the difference between a prediction and a trace.
5
A pupil says, “My program passed all my tests, so it is perfect.” What could be wrong?