Page 28 - Touchcode_C8_Flipbook
P. 28
Step 16: Again, From ‘Game’ select the ‘splash’ block. Write the message ‘Number is
divisible by 7 only’. Drop the ‘splash’ block in ‘else’ section.
Step 17: From ‘Logic’ select ‘if-else’ block and drop it to the ‘else-if’ block.
Step 18: From ‘Logic’ select the ‘comparison’ block and drop it to the ‘true’ of ‘if-else’ block.
Step 19: From ‘Math’ select the ‘remainder of’ block and drop it to the first ‘0’ of ‘comparison’
block.
Step 20: In first ‘0’ of ‘remainder’ block, drag and drop the variable ‘number’ and in the
second ‘1’ of remainder block change the number from ‘1’ to ‘7’.
Step 21: From ‘Game’ select the ‘splash’ block. Write the message ‘Number is divisible by
both 9 and 7’. Drop the ‘splash’ block in ‘if’ section.
Step 22: Again, From ‘Game’ select the ‘splash’ block. Write the message ‘Number is
divisible by 9 only’. Drop the ‘splash’ block in ‘else’ section.
Step 23: From ‘Game’ select the ‘splash’ block. Write the message ‘Number is divisible by
neither 7 nor 9’. Drop the ‘splash’ block in ‘else’ section.
26 Touchcode-VIII

