Page 130 - 2611_SmartGPT Pro V(5.0) C-5
P. 130
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 To Refresh
second slot of the addition block. Companion Screen:
Step 22 From the Lists category, drag the add items Short key Alt + R
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.
Here is the final preview of the code.
128 Computer Science (V5.0)-V

