Page 57 - Touchcode_C7_Flipbook
P. 57

3.  ........................... are a generalization of all the things on which the program can respond to.
                     4.  Function makes the code organised and ........................... .

                     5.  Functions can be individually ........................... .

                 D.  Answer the following questions:

                     1.  What is pattern?

                         .............................................................................................................................................................
                         .............................................................................................................................................................
                     2.  Write any two advantages of function.

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

                     3.  Write the difference between parameter and arguments.
                         .............................................................................................................................................................
                         .............................................................................................................................................................
                     4.  What do you mean by event handler?

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

                                                                                                   Experiential Learning
                       Applied Project

                                              To add two integers using function

                  To perform the task, follow these steps:

                  Step 1:  Visit the  link:  https://arcade.makecode.com/. Give  the  name of
                           your project as ‘To add two integers using function’ and click on
                           ‘Create’.

                  Step 2:   Create variables: num1, num2, num3.
                  Step 3:   Click on ‘Function’, select ‘Make a Function’. Name the function
                           ‘Addition’, Click on ‘Number’, and name it as ‘num1’, ‘num2’. Click
                           on ‘Done’. Function ‘Addition’, will appear on workspace.











                  Step 4:   From ‘Game’, select ‘splash’ block.  Click on ‘Advanced’, select ‘Text’, and then click on
                           ‘join’ block. Drag the ‘join’ block and drop it to the ‘splash’ block.


                                                                                           Fun with Functions    55
   52   53   54   55   56   57   58   59   60   61   62