Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 107 - 2629_Devagiri_C-5
P. 107

    Step   16  Drag set global Answer to and connect the number block (0) from the

                                  Math category.

                     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                       SHORT SIGN
                                  section, drag TextBox1. Text and place it in                       To Refresh

                                  the second slot of the addition block.                        Companion Screen:

                     Step   22  From the Lists category, drag the add items                            Alt + R
                                  to list block into the Viewer and connect it to

                                  global List to store the multiplication results.

                                                                                    Creating Apps with MIT App Inventor  105

| 102 103 104 105 106 107 108 109 110 111 112 |