Page 66 - Touchcode_C8_Flipbook
P. 66
Step 8: In ‘set interNumber to’ block, in ‘0’, drag and drop the ‘remainder of’ block to ‘0’, and in frits
‘0’ of ‘remainder’ block drag-drop the variable ‘newnumber’. In second ‘1’ of ‘remainder’
block change the value of ‘1’ to ’10’.
Step 9: In ‘set number to’ in ‘0’ of the block, drag-drop the ‘division’ block, and in first ‘0’ of ‘division’
block drag-drop the ‘multiplication’ block. In first ‘0’ of ‘multiplication’ block drag-drop
the variable ‘number’ and in second ‘0’ change the value to ‘10’. Now, in second ‘0’ of
‘division’ block, drag-drop the variable ‘interNumber.
Step 10: Drag-drop the ‘set newnumber to’ block, and drop it to ‘while’ loop, below the ‘set number
to’ block. Drag-drop the ‘division’ block, and in first ‘0’ of ‘division’ block drag-drop the
‘subtraction’ block. In first ‘0’ of ‘subtraction’ block drag-drop the variable ‘newnumber’
and in second ‘0’ drop the variable ‘interNumber’. Now, in second ‘0’ of ‘division’ block,
change its value to ‘10’.
Step 11: Drag-drop the ‘set newnumber to’ block to outside the ‘while’ loop. Drop the variable
‘storednumber’ to ‘0’.
Step 12: From ‘Game’ select ‘splash’ block. From ‘Text’ select ‘convert 0 to text’ block, and in ‘0’
drag-drop the variable ‘newnumber’.
Step 13: Click on the ‘+’ of ‘splash’
block and drop the ‘join’ block
from ‘Text’, write the message
‘reversed is’ and in second
block of ‘join’ block, drop
the block ‘convert 0 to text’.
In ‘0’ drag-drop the variable
‘number’.
Step 14: Click on ‘Start the simulator’
button to view the output.
64 Touchcode-VIII

