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

Two tests, one decision

Week 4 · 1.2 Selection in pseudocode · 3 lessons
Answers are for parents and teachers.
1
Work out the result: x holds 15. (a) x > 10 AND x < 20 (b) x < 5 OR x = 15 (c) NOT (x > 10).
2
Follow the algorithm for the inputs 3, 4, 6 and 7.
Pseudocode
1INPUT n
2IF n >= 4 AND n <= 6 THEN
3    OUTPUT "In"
4ELSE
5    OUTPUT "Out"
6ENDIF
3
Write a condition: the player has at least 3 lives and has collected fewer than 10 stars, OR the player has the key (variable key, value "yes").
4
Explain why a sports club that writes IF age < 10 OR age > 15 THEN OUTPUT "Welcome" would let in a 5-year-old.
5
Complete the sentence in your own words: NOT reverses a condition, so NOT (n = 4) is true when ...