Page 88 - Touchcode_C6_Flipbook
P. 88

TEST SHEET 2


                                                         Based on chapters 4 & 5


                  A.  Tick ( ) the correct option.

                      1.  If two expressions are true, which operator gives true as a result?
                          a.  And                                       b.  Or
                          c.  Not                                       d.  If-else


                      2.   Which operator gives true as a result and is used if the statement evaluates true only if one
                          of the expressions is true?

                          a.  And                                       b.  Or
                          c.  Not                                       d.  If-else

                      3.  Which of the following operator is used to reverse a condition?
                          a.  And                                       b.  Or

                          c.  Not                                       d.  If-else
                      4.  Which of the following executes a block of code multiple times until a specific condition is met?
                          a.   Iteration                                b.  Loop

                          c.  Continue statement                        d.  Break statement

                      5.  Which of the following track how many times the loop is executed?
                          a.   Counter variable                         b.  Incrementing loop
                          c.  While loop                                d.  For loop

                      6.   Which of the following loop executes a statement or group of statements till a given condition

                          is true?
                          a.   While loop                               b.  For loop
                          c.   Nested loop                              d.  Incrementing loop

                      7.  Which of the following symbol is used to represent AND operator?
                          a.  &&                                        b.  ||

                          c.   !                                        d.  **
                      8.  Which of the following loop is used for iterating a sequence over a specific number of times?

                          a.  While loop                                b.  For loop
                          c.   Nested loop                              d.  Incrementing loop

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

                      1.  A loop reduces lines of code.

                      2.  Condition should result false at a certain point of time, otherwise code block

                          will enter in an infinite loop.


                   86     Touchcode-VI
   83   84   85   86   87   88   89   90   91   92   93