Consider the following algorithm designed to control security gate access:
1 is_weekend ← USERINPUT
2 has_pass ← USERINPUT
3 IF NOT (NOT is_weekend AND NOT has_pass) THEN
4 OUTPUT "Access Granted"
5 ELSE
6 OUTPUT "Access Denied"
7 ENDIF
Which of the following is a true statement about this algorithm?
The Boolean expression on line 3 is logically equivalent to is_weekend AND has_pass.
The output will be "Access Granted" when both is_weekend and has_pass are False.
The Boolean expression on line 3 is logically equivalent to is_weekend OR has_pass.
The algorithm uses a nested selection construct to evaluate the conditions.
19 exam-style questions on AQA GCSE Computer Science Boolean operations in a programming language. Each one has a worked solution and a mark scheme showing where the marks go.