skip to content
Introduction to Coding

Introduction to Operators Blocks

Operators Blocks in Scratch 3.0

Operators blocks are color-coded light-green and are used to script math equations and string handling. There are currently 18 Operators blocks: 7 Boolean blocks and 11 Reporter blocks.

Boolean Blocks

Scratch 3.0 has the following seven Operators Boolean blocks:

  • < () < () > — The condition for checking if a value is less than the other.
  • < () = () > — The condition for checking if two values are equal.
  • < () > () > — The condition for checking if a value is greater than the other.
  • < () and () > — True if both conditions are true.
  • < () or () > — True if either condition is true.
  • < not () > — Makes the condition checked if it is false, not true, or true, not false.
  • <[() contains ()]> — Checks if the first parameter’s text contains the second parameter’s text — if it does, the block returns true.

Reporter Blocks

Scratch 3.0 has the following eleven Operators Reporter blocks:

  • () + () — The value of the addition.
  • () - () — The value of the subtraction.
  • () * () — The value of the multiplication.
  • () / () — The value of the division.
  • pick random () to () — Picks a random number between the two limits.
  • join () () — The two values put right next to each other.
  • letter () of () — The specified character of the value.
  • length of () — The length of the value.
  • () mod () — The remainder of the division.
  • round () — Rounds the value to the nearest whole number.
  • () of () — The absolute value (abs), square root (sqrt), sine (sin), cosine (cos), tangent (tan), arcsine (asin), arccosine (acos), arctangent (atan), natural logarithm (ln), logarithm (log), exponential function (e^), or base 10 exponential function (10^) of a specified value.