1
0/1

An algorithm is shown in the pseudocode below:

1      score ← USERINPUT
2      IF NOT(score < 10) AND score < 50 THEN
3          OUTPUT "Standard"
4      ELSEIF score >= 50 AND score < 90 THEN
5          OUTPUT "High"
6      ELSEIF score MOD 10 = 0 THEN
7          OUTPUT "Bonus"
8      ELSE
9          OUTPUT "Invalid"
10     ENDIF

Rewrite line 2 from this algorithm without using the NOT operator.

The algorithm must still function in exactly the same way.

[1]

Boolean operations in a programming language Questions

Practise AQA GCSE Computer Science Boolean operations in a programming language with exam-style questions for GCSE Computer Science. 19 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

Next

Boolean operations in a programming language Questions

  1. GCSE
  2. /Computer Science
  3. /Boolean operations in a programming language