Operators Blocks – List
Block |
Description |
The block adds two values and reports the The numbers can be typed directly into the block, or Reporter blocks can be used instead. | |
The block subtracts the second value from the first and reports the result. The numbers can be typed directly into the block, or Reporter blocks can be used instead.
This block can be stacked inside itself. This can be used to fit more numbers in. |
|
The block multiplies the two values given and reports the result.it will be shown as () × ().The numbers can be typed directly into the block, or Reporter blocks can be used instead. This block can be stacked inside itself – this can be used to fit more numbers in or calculate exponents. | |
The block divides the second value from the first and returns the If the first value is not evenly divisible by the second, the reported value will have decimals.
To find the remainder instead, use the () Mod () block. The numbers can be typed directly into the block, or Reporter blocks can be used instead. This block can be stacked inside itself — this can be used to fit more numbers in.
|
|
The block returns a pseudorandom number ranging from the first given number to the second, including both endpoints.
If both numbers are integers, the number returned will also be an For example, if a 1 and a 3 were the bounds, the block might return either a 1, 2 or 3. If one or both of the numbers is a float, the number returned will be a double. For example, if 0.1 and 14 were given, the output could be any number between 0.1 and 0.14, with up to 17 digits after the decimal point (e.g. 0.13545101673985742). |
|
The block reports true if the first value is greater than the second value and false.
|
|
The block reports true if the first value is less than the second value and false This block can compare both numbers and strings, which are ordered alphabetically. | |
The block checks if the first value is equal to the second If the values are equal, the block returns true; otherwise, it returns false. This block is case-insensitive, meaning that capital and lowercase letters are treated the same. | |
The block joins two Boolean blocks so they both have to be true to return If they are both true, the block returns true; if only one is true or none are true, it returns false.
This block can be stacked inside itself, which can be used to test more conditions. |
|
The block returns true if at least one of its inputs are true; if neither of them are true, it returns false.
This block can be stacked inside itself .This can be used to compare more conditions. |
|
The block returns the opposite value of the Boolean input, reversing its value. | |
The block concatenates, or “links” the two values together and reports the result — for example, if “hello” and “world” were put in the block, it would report “hello world”. To report “hello world”, use either “hello ” and “world” or “hello” and ” world”, with a space.
To join three or more values together, drag copies of this block into its inputs. |
|
The block reports the specified character of the given Even though the block says “letter”, it will report all characters, including letters, numbers, symbols, and even spaces. The block is also useful to write the time, show scores in games, generating project save codes, and decoding certain scripts. | |
The block reports how many characters the given string contains. | |
The block returns whether or not the first parameter’s text contains the second parameter’s text. The comparison is not case-sensitive. | |
It reports the remainder when the first input is divided by the second. For example, when 10 is put in the first input and 3 in the second, the block will report 1; 10 divided by 3 gives a remainder of 1.
() Mod () supposes the quotient (result of division) is always rounded down, even if it is negative. For example, -10 mod 3 = 2, not -1, because the quotient -10/3 is rounded down to -4, giving a positive remainder. |
|
The block rounds the given number to the nearest It follows the standard rules of rounding; decimals that are .5 or higher are rounded up, whereas decimals less than .5 are rounded down. | |
The block performs a specified function on a given number and reports the result. The function can be changed by using the drop-down menu.
“abs” is an abbreviation for “absolute value.” The absolute value of a number is its distance from 0. A simpler way to describe an absolute value is that it makes any number positive. If it is negative, it becomes positive, and if it is positive, it stays the same. |