Page 71 - 2617_JSSPS_C-7
P. 71

8.  Variables Blocks: These blocks store values that can change while the app runs. You can create, set
                   and get variable values. For example,


                                                  This block allows you to access and use the current value stored in a
                                      get
                                                  variable.



                                                  This block assigns a new value to a variable. Like the get block, only
                                     set   to
                                                  variables within scope appear in the drop-down.


                 9.  Procedures Blocks: These blocks let you create reusable sets of instructions. They help you avoid
                   repeating code and keep your app organised. For example,


                                    to  procedure2
                                                   Collects a sequence of blocks together into a group.
                                 result



                                    to  procedure  Same as a procedure do block, but this procedure returns a result
                                  do               when called.



                 CREATING AN APP

                 In this activity, you will create an app that shows a multiplication table when a number is entered. The
                 app will display the results of multiplying the number by 1 to 10.

                 To make the Multiplication Table App, follow the given steps:

                 Step 1:  Click on the New Project button and name it Multiplication_Table.
                 Step 2:  Click on the Screen1 option and set AlignHorizontal to Center: 3 and AlignVertical to Top 1.

                 Step 3:  Drag a Label from the Palette to the Viewer, then set its properties: Text to Multiplication
                          Table, FontSize to 30, check FontBold and align it to Center.

































                                                                                               App Development      69
   66   67   68   69   70   71   72   73   74   75   76