Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 140 - 2632_CodeMind
P. 140

    test Your skiLLs

                     1.  Tick ( ) the correct option.
                        a.  The result of the computer’s decision for a _______________ will always be either true or false.

                           (i)  loop                                       (ii)   condition

                           (iii)  Expression                               (iv)  Function

                        b.  A loop is used to execute instructions or a block of code _______________ times.
                           (i)  two                                        (ii)  three

                           (iii)  multiple                                 (iv)  ten

                        c.  What is an endless loop called?
                           (i)   Counting loop                             (ii)  Conditional loop

                           (iii)  Infinite loop                            (iv)  Finite loop

                        d.  Which of the following results true if both conditions are true?

                           (i)  AND                                        (ii)  OR

                           (iii)  NOR                                      (iv)  NAND

                     2.  Fill in the blanks using the words given below:

                                                         condition, conditional, else, if

                        a.   Conditional statements in a program instruct the computer to make a decision based on a
                           given _______________.
                        b.   The statements written after the _______________ condition in a program are executed when

                           the condition is true.
                        c.   In a  program,  the  statements  following  _______________ are  executed  when the  condition
                           specified in the 'if' statement is false.

                        d.  There are two types of loops: counting loops and _______________ loops.
                     3.  Short answer type questions.

                        a.  Define conditional statements.
                           __________________________________________________________________________________

                           __________________________________________________________________________________
                        b.  Give one difference between AND and OR conditions.

                           __________________________________________________________________________________
                           __________________________________________________________________________________

                                                                                                Algorithmic Intelligence  139

| 135 136 137 138 139 140 141 142 143 144 145 |