Page 73 - 2617_JSSPS_C-7
P. 73

Step 17:  Add a Loop for multiplication, inside the Button1 block, drag the block 'for each number
                          from 1 to 10 by 1' from the Control category. This loop will repeat 10 times, calculating the
                          multiplication values from 1 to 10.

                 Step 18:  Drag the set global Answer to block from the Variables section.
                 Step 19:  Add the multiplication logic from the Math category, drag the addition block (+) and connect
                          it to set global Answer to.
























                 Step 20:  Set the first slot to get global Answer from the Variables category, drag get global Answer

                          and place it in the first slot of the addition block.
                 Step 21:  Add the input number from the TextBox1 section, drag TextBox1. Text and place it in the
                          second slot of the addition block.
                 Step 22:  From the Lists category, drag the add items to list block into the Viewer and connect it to
                          global List to store the multiplication results.

                 Step 23:  Use the join block to format the multiplication statement from the Text category, drag the
                          join block and connect it to the item socket of the add items to list block.

                 Step 24:  Add TextBox1 input as the first number from the TextBox1 category, drag TextBox1. Text
                          and place it in the first input of the join block.
                 Step 25:  Add the multiplication symbol (×) from the Text category, drag a text block (empty quotes “ ”)
                          and type ×, then connect it as the next input in the join block.

                 Step 26:  Add the loop number from the Variables category, drag �get number” and place it in the join
                          block after the × symbol. This represents the multiplier (1 to 10).
                 Step 27:  Add the equals symbol (=) from the Text category, drag another text block, type = and connect
                          it as the next input in the join block.

                 Step 28:  Add the computed answer from the Variables category, drag the get global Answer and
                          place it as the final input in the join block. The join block is used to format the multiplication
                          equation (e.g., 5 × 1 = 5).
                 Step 29:  Inside  the  ListView1  Click  block,  Drag  the  set  ListView1.  Elements  to  block  into  the
                          Viewer and connect the get global List to it. This step updates the ListView to display the
                          multiplication table stored in the global List.





                                                                                               App Development      71
   68   69   70   71   72   73   74   75   76   77   78