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

Term 1 in review

Week 11 · Review: Term 1 · 3 lessons
Answers are for parents and teachers.
1
Follow the algorithm when the user types 5. What is output? Then change it so that the loop outputs the even numbers 2, 4, 6, 8 and 10.
Pseudocode
1INPUT limit
2FOR n ← 1 TO limit
3    OUTPUT n * 5
4NEXT n
2
Write Python. The user types a word. Print it in capital letters, then print how many characters it has. What is printed for the word tiger?
3
The list is scores = [8, 15, 11, 20]. Write the value of scores[1], of scores[3] and of len(scores). What happens with scores[4]?
4
Two programs both output the total of two typed numbers. Program A uses four variables. Program B uses two. Program B misses the requirement to output the total. Which program is better? Explain.
5
The sorted list is 2, 9, 14, 20, 27, 35, 41. Use a binary search to find 35 and write the centre item at each check. How many comparisons does it take?