Logical Operators

Task18Q
Task 18 proved to be a very interesting design challenge. We ended up with a design that required lots of IF..ELSE statements.

Task 18This was quite complex when we created the Scratch program, as we had to have many IF statements nested inside each other. Scratch only allows you to have IF..THEN or IF..ELSE..THEN

We looked for a way to simplify the code and discovered that we could use the Logical Operator AND to make the IF statements more efficient.The new design is a lot simpler and therefor easier to code.

Task 18b

At national 5 we use the Logical Operators AND, OR & NOT. These are used to combine conditional statements and return either True or False.

  • AND is used to check if both of the conditional statements are True. If they are, it returns True, if not it returns False.
  • OR checks if either conditional statement is True, If either is, it returns True, if not it returns False.
  • NOT returns the opposite of the statement so NOT False is True and vice versa.

Leave a Reply

Your email address will not be published. Required fields are marked *