Page 69 - 2617_JSSPS_C-7
P. 69
The important sections of the blocks editor window:
Built-in Blocks: These are the basic blocks in MIT App Inventor (e.g., Control, Math, Text) used to
program app behaviour.
Component-Specific Drawers: Each component (e.g., Button, Label) has its own set of blocks for
controlling actions and settings.
Blocks Button: Switches you from the design area to the blocks area to write the app’s code.
Viewer: The viewer is where you drag and drop blocks to create your app’s functionality by connecting
them like puzzle pieces.
Different Blocks of Blocks Editor
Built-in blocks are always available and provide basic tools for logic, text, variables and more in the
Blocks Editor.
1. Control Blocks: These blocks manage the flow of the program using conditions, loops and event
triggers. They help you decide what happens and when. For example,
if Tests a given condition. If the condition is true, it runs the specified blocks; if
then not, it skips them.
if
then Tests a given condition. If it is true, the blocks in the then part run; if it is false,
the blocks in the else part run.
else
2. Logic Blocks: These blocks allow you to make decisions using true/false values. You can compare
values and use logical operations like AND OR and NOT. For example,
Represents the constant value true. It is used to set the Boolean properties of
true
components or assign a condition value to a variable.
Represents the constant value false. It is used to set the Boolean properties of
false
components or assign a variable to represent a condition.
3. Math Blocks: These blocks perform basic and advanced mathematical calculations. You can add,
subtract, multiply, divide and more. For example,
This block lets you display numbers in decimal form and can also show them
decimal 0
in other formats, such as binary or hexadecimal.
This block compares two values to check if one is greater than, less than or
=
equal to the other.
App Development 67

