Diagnostic Misconceptions - Comparison Operators

Computer Science: OCR GCSE, topic 2.2.19

Test yourself on Diagnostic Misconceptions - Comparison Operators

  • What does 15 > 18 evaluate to?

  • What does 2 > -6 evaluate to?

  • An algorithm is designed that will tell the user that they are an adult if the age they enter is 18 or above.

    Which operator should the algorithm use between `age` and `18` ? ``` age __ 18 ```

Practise this topic for free