Pearson Edexcel GCSE Computer Science (1CP2)Specification point 6.5.3

Edexcel 1CP2 6.5.3: Logical operators

The free BugBot lesson that teach this point, a robot to try it on, and the past-paper questions that test it.

What it covers

if distance() > 60: led("green") print("plenty of room") else: led("red") print("not much room") print("decided") ```

  • else: what to do otherwise
  • elif: several choices
  • Joining conditions: and, or, not
  • Checking a range
Read the free lesson (15 min)

Or do it in the simulator, with tasks that mark themselves

Lessons that teach it

  1. F2.3 else, elif and Boolean operators Decisions and loops
    Choosing between outcomes, and joining conditions with and, or and not.

Try it on a robot

The task from F2.3 else, elif and Boolean operators, running here. Change the program and press Run.

Past paper questions on this

Real exam questions that test this, each worked through with a program you can run.

The specification is Edexcel's own document; this page says which of our lessons teach point 6.5.3 and is not endorsed by the board.