Page 59 - Touchcode_C7_Flipbook
P. 59

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































                      Well done, you have learned to add two integers using function.



                                                                                                       Critical Thinking

                       Higher Order Thinking Skills                                                          (HOTS)

                     Write an algorithm to find if a number is a perfect square.



                      Teacher’s Corner

                 1.  Discuss the concept of functions and redundancy with students.
                 2.  Ask students to write a function to find the modulus of 3 and 6.




                                                                                           Fun with Functions    57
   54   55   56   57   58   59   60   61   62   63   64