How to program our robot to check if a condition is NOT met Pro Preview

Large manufacturing companies have big dangerous machines that check if it's safe to begin operations. These machines don't check if there's someone, rather if there is no one in their working environment in order to execute their operations.

To access the full video please subscribe to


  • #1630
  • 11 Jun 2020

Such conditions can be described using the "not" operator. The way this operator is used is by placing it before the condition you wish to check if it's unmet.

Here's what this operator should look like when used in an "if" operator:

if not condition:
    (code for conditional execution)

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Python with LEGO Mindstorms EV3 - Level 2
  • 39
  • 19:58
  • 93
Image for Lesson 2 - Grabber control panel
  • 6
  • 6
  • 7
  • 3d_rotation 2