Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 101 - 2612 Digimind C6
P. 101

    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. 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. 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. 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.

                                                                                     Creating Apps with MIT App Inventor  99

| 96 97 98 99 100 101 102 103 104 105 106 |