Page 56 - Touchcode_C7_Flipbook
P. 56

Exercise


                  A.  Tick ( ) the correct option.

                      1.  Which of the following helps to repeat certain lines of code in a sequence?
                          a.  Event                                     b.  Function

                          c.  Redundancy                                d.  Event handler
                      2.  Which of the following means you do not repeat the same lines of code throughout the code

                          and use functions?
                          a.  Event handler                             b.  Argument

                          c.  Redundancy                                d.  Parameter
                      3.  Which of the following is the variable local to function, and is part of the definition?

                          a.  Argument                                  b.  Parameter
                          c.  Non-real value                            d.  Real value

                      4.  Which of the following is the value that is passed on to the function?

                          a.  Argument                                  b.  Parameter
                          c.  Function                                  d.  Redundancy

                      5.  Which of the following is the variable accepted by a function to perform the set of tasks
                          defined in its body?

                          a.  Function parameter                        b.  Argument
                          c.  Event                                     d.  Function

                  B.  State whether the following statements are true (T) or false (F).

                      1.  Redundancy means you repeat the same lines of code throughout the code.


                      2.  Functions enhance the readability of a program.


                      3.  Event is an action on which the program responds.

                      4.  Event handler is associated with an event.


                      5.  Sorting is the arranging data into a meaningful order.

                  C.  Fill in the blanks.


                                   HELP BOX    repetitive, understandable, tested, events, compare

                      1.  To sort items, you need to ........................... two items.

                      2.  The main purpose of using functions is to get rid of the ........................... block of code.


                   54     Touchcode-VII
   51   52   53   54   55   56   57   58   59   60   61