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 12 · 1.8 Testing · 3 lessons
Answers are for parents and teachers.
1
A program accepts whole numbers from 10 to 50 inclusive. Say whether each value is normal, invalid or extreme (some are two kinds): 10, 30, 9, 50, 51.
2
A music player accepts a volume from 0 to 10 inclusive. Make a table of six tests. For each one, give the kind of data, the number typed and the message that should appear: Volume set or Volume not allowed.
3
Say whether each error is a syntax error or a logic error: (a) a missing quotation mark in a print line; (b) using + instead of − in a change calculation; (c) writing else if instead of elif; (d) testing age > 12 when 12 should be allowed.
4
This program should print Big for any number above 60. It has one syntax error and one logic error. Find both and correct the program.
Python
1number = int(input("Number? "))
2if number >= 60
3    print("Big")
5
Explain the difference between extreme data and boundary data. Use the range 3 to 9 to give examples.