Logical Operators

Lesson

Logical Operators

There are 3 new logic operators this lesson is going to cover. And, Or and Not. These operators allow you to combine other operators such as greater than or less than.

As the name implies they are fairly simple to understand as demonstrated below.

The And block will return true if the blocks on either side are true.

This image has an empty alt attribute; its file name is image-7.png

The Or block will return true if either of the blocks are true.

This image has an empty alt attribute; its file name is image-8.png

The Not block will return the opposite so if it would normally be true it will instead return false

The demo code and link below shows all 3 blocks being used. Have a go playing with the code and try changing it so it does different things

https://scratch.mit.edu/projects/351903301

@

Not recently active