logo

Pearson Edexcel GCSE (9-1) Computer Science practice

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?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Algorithms

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?.

  1. A.'>=' and 'OR'
  2. B.'<' and 'AND'
  3. C.'>=' and 'AND'
  4. 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.

Related flashcards

Flashcard 1 of 6

Press Space to flip, arrows to move

Related practice questions