Scratch & Flowcharts
Scratch Operators Code Blocks
Updated 8 November 2026 1 min read

Scratch operators represent mathematical and logical statements, so your program can calculate results. You will find the Operators blocks in Scratch by clicking the green circle shown below.

Here is what each Operators block does.
Scratch Operators

These blocks do arithmetic on numbers and variables. You can place them inside other blocks, and inside each other, to build longer expressions.

This block picks a random number from a range you choose.

These blocks test for equivalence or relative value (equal, greater than, or less than). They can be used with Control blocks to make logic tests. After doing the comparison these code blocks output either TRUE or FALSE.

The AND, OR and NOT blocks make logical tests, usually inside a Control block. Each one outputs TRUE or FALSE depending on its inputs.

This block checks whether a character appears in a string. It outputs TRUE if it does and FALSE if it does not.

These blocks work on “strings” of text, and can also be used with numbers. JOIN combines two strings into one. LETTER OF gives the character at a position. LENGTH OF counts the characters in a string.

The “modulo” function reports the remainder of a division operation.

The “round” function helps to round off the values by removing decimal digits.

This block gives other mathematical functions you may need.
Example: finding the square root of a number

Examples to Practice Scratch Operators
Find the account balance after a withdrawal

Check the length of a password and say whether it is strong enough.

Video recording
Practise with real papers
More Scratch & Flowcharts articles
Scratch Practicals + Free Downloadable QuizBuild beginner Scratch programs to print names, add and multiply numbers, calculate a rectangle perimeter and find an average.
ගැලීම් සටහන් (උදාහරණ සමග)ගැලීම් සටහන්වල මූලික සංකේත, ක්රියාවලි පියවර, ආදාන, ප්රතිදාන සහ තීරණ නිවැරදිව නිරූපණය කරන ආකාරය සරල සිංහල උදාහරණ සමඟ ඉගෙන ගන්න.
Have ICT notes or papers from your school? Share them and help other students.
Submit a Paper