Section 1: Software design and development, and Computer systems
The program code below protects the rechargeable battery in an electric toothbrush.
…
Line 67 SET brushstop TO FALSE
Line 68 WHILE brushstop = FALSE DO
Line 69 SET battery TO <percentage of power left>
Line 70 SET temperature TO <temperature of battery>
Line 71 IF battery < 3 OR temperature > 45 THEN
Line 72 SET brushstop TO TRUE
Line 73 END IF
Line 74 END WHILE
Line 75 <switch toothbrush off>
…
(a) State the logical operator in this code.
1 mark
(b) Describe the purpose of the Boolean variable in this code.
1 mark