Diagnostic Misconceptions - = & ==

Computer Science: OCR GCSE, topic 2.2.20

Equality Operators

Assignment (=)

  • This operator is used to assign a value to a variable.

Equal to (==)

  • This operator checks if the two variables either side are equal.
  • The == operator returns True if they are equal and False if they are not.

Not equal to (!=)

  • This operator checks if the two variables either side are not equal.
  • The != operator returns True if they are not equal and False if they are.

Test yourself on Diagnostic Misconceptions - = & ==

  • What does the following operator stand for?

    ==

  • What does the following operator stand for?

    =

  • What does the following operator stand for?

    !=

  • What does 7 == 8 evaluate to?

Practise this topic for free