Page 18 - Touchcode_C8_Flipbook
P. 18

4.  If the condition is true, ........................... will return false and vice-versa.
                      5.  Relational operator returns ........................... if the value is true.


                  D.  Answer the following questions:

                      1.  What are the different types of control structures?
                          .............................................................................................................................................................

                          .............................................................................................................................................................
                      2.  Define relational operators.

                          .............................................................................................................................................................
                          .............................................................................................................................................................

                      3.  What are logical operators?
                          .............................................................................................................................................................
                          .............................................................................................................................................................


                                                                                                     Experiential Learning
                         Applied Project


                                                   The nested division problem

                   In this task, you will learn to create a program which checks if a number is divisible by 4
                   or 5 or by both 4 and 5.

                   To perform the task, follow these steps:
                   Step 1:   Visit the link: https://arcade.makecode.com/. Create a project
                             ‘Nested division problem’, and click on ‘Create’.

                   Step 2:   Create a variable ‘number’.
                   Step 3:   Select ‘set number to 0’  block  and  drop  it  to the  ‘on  start’
                             block.










                   Step 4:   From ‘Logic’ select ‘if-else’ block and drop it to the ‘on start’ block below the ‘set number
                             to 0 ‘ block. Click on ‘+’ to add one more ‘else’ block.
                   Step 5:   From ‘Logic’ select the ‘comparison’ block and drop it to the ‘true’ of ‘if-else’ block.
                   Step 6:   From ‘Math’ select the ‘remainder of’ block and drop it to the first ‘0’ of ‘comparison’ block.
                   Step 7:   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 ‘4’.



                   16     Touchcode-VIII
   13   14   15   16   17   18   19   20   21   22   23