Page 54 - Touchcode_C7_Flipbook
P. 54

Step 10: Drag the ‘splash’ block and drop it to the ‘on start’ block. Change the value of ‘call
                             Square of a number’ to ‘2’ and ‘call Cube of a number’ to ‘6’.


























                   Step 11: Click on ‘Start the simulator’ to see the output:






















                      Well done,  you have learned to perform arithmetic operations with functions!





                  WHAT IS AN EVENT?
                  Event is an action which has happened. You can consider event as a generalization of things
                  on which the program responds.

                  In  programming,  an  event  is  an  action  which  occurs  as  a  result  of  the  user  or  another

                  source, such as a mouse click.

                  Examples of the events are:
                      Clicking and loading the web page on web browser
                      Creation of file in a file system





                   52     Touchcode-VII
   49   50   51   52   53   54   55   56   57   58   59