Page 58 - Touchcode_C7_Flipbook
P. 58
Step 5: Write the message ‘The sum of num1 and num2 is:’ in ‘hello’ and in ‘world’ drag the
variable ‘num3’, and drop it in a ‘join’ block.
Step 6: Drag the ‘splash’ block and drop it to the ‘function’ block.
Step 7: From ‘function’ select the ‘return’ block, and drop it in the function ‘Addition’. In ‘0’ of
‘return’ block, drag and drop the variable ‘num3’.
Step 8: From ‘Variable’ select ‘set num1 to 0’ , ‘set num2 to 0’ and ‘set num3 to 0’ block and drop
them to ‘on start’ block.
Step 9: From ‘Math’ select ‘addition’ block, drag-drop the variable ‘num1’, ‘num2’ in the ‘0’ of
addition block. Drop the addition block to ‘0’ of ‘set num3’.
Step 10: From the ‘Function’ select ‘call Addition’ block and drop the block to ‘on start’ block.
Change the value of ‘num1’ to ‘3’ and ‘num2’ to ‘10’
56 Touchcode-VII

