Exam-style question
Try this first
An algorithm needs to check if a user's age is greater than or equal to 18 AND their 'isAdult' status is TRUE. Which combination of operators would be most appropriate?.
- A.'>=' and 'OR'
- B.'<' and 'AND'
- C.'>=' and 'AND'
- D.'==' and 'NOT'
Answer and explanation
Concise answer
'>=' and 'AND'
Why this is correct
The requirement 'greater than or equal to 18' uses '>=' and combining two conditions where both must be true uses 'AND'.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
