Operators
Last updated
Last updated
Perform mathematical addition.
Example:
Press Button A. Codey's screen will display the result of "2 + 3".
Perform mathematical subtraction.
Example:
Press Button A. Codey's screen will display the result of "3 - 1".
Perform mathematical multiplication.
Example:
Press Button A. Codey's screen will display the result of "2 × 3".
Perform mathematical division.
Example:
Press Button A. Codey's screen will display the result of "6 ÷ 2".
Pick a random number from the specified range.
Example:
Press Button A. Codey's screen will display the image for a random number of seconds within the range of 1 to 10.
If the value of the specified parameter is greater than the specified value, the report condition is met.
Example:
Shake Codey. If the shaking strength is greater than 10, Codey will play the sound "wow".
If the value of the specified parameter is less than the specified value, the report condition is met.
Example:
When Codey starts up, if battery level is lower than 50%, Codey's screen will display "low battery".
If the value of the specified parameter equals the specified value, the report condition is met.
Example:
When Codey starts up, if the red value of the object detected equals 255, Codey's LED will light up red.
If both the conditions are met, the report condition is met.
Example:
After starting up, Codey Rocky will keep moving forward at 50% power until red obstacle is detected.
If either one of the two conditions is met, the report condition is met.
Example:
When Codey starts up, Codey will play the sound "hello", if Button A is pressed or if being shaken.
The report condition is met when the specified condition is not met.
Example:
When Codey starts up, if there no obstacle ahead, Codey Rocky will keep moving forward at 50% power.
Join two specified character strings.
Example:
When Codey starts up, the screen will display "hi" and "morning" together.
Report the letter at specified position of a character string.
Example:
When Codey starts up, the screen will display the third letter of "morning".
Report the length of a specified character string.
Example:
When Codey starts up, the screen will display the length of "morning."
If the specified character string contains the other specified character string, the report condition is met.
Example:
When Codey starts up, if "apple" contains "a", Codey's screen will display "yes".
Calculate the remainder (modular) of two specified numbers.
Example:
When Codey starts up, the screen will display the remainder of "9 ÷ 6".
Round the specified number to nearest integer.
Example:
When Codey starts up, the screen will display the result of rounding 10.7.
Perform specific mathematical operation on the specified number. Mathematical operations include: abs (absolute value), floor, ceiling, sqrt (square root), sin, sos, tan, asin, atan, acos, ln, log, e^, and 10^.
Example:
When Codey starts up, the screen will display the square root of 16.