Page 117 - Trackpad_V5_Book 8
P. 117

1.  Tick ( ) the correct option.

                a.  Which of the following is a selective structure?
                    (i)   Identifiers, Operators                     (ii)  If, If-else

                   (iii)  For, While                                 (iv)  None of these
                b.   Which of the following is a decision-making statement?
                    (i)   If                                         (ii)  For

                   (iii)   While                                     (iv)  do While
                c.  Which statement is used in loops to terminate the loop?

                    (i)  If                                          (ii)  Continue
                   (iii)   break                                     (iv)  All of these
                d.   Which of the following statements is used to repeat a block of code?

                    (i)   For                                        (ii)  Range
                   (iii)  Both (i) and (ii)                          (iv)  if-else

            2.  Fill in the blanks using the words from the help box.

                                  sequential, control statement, continue, conditional


                a.   A _____________ is a programming construct which affects the flow of the execution of a program.
                b.   The statements which are executed one after the other without any jumps are called
                   _____________ statements.
                c.   When programmers are required  to  execute a particular  set  of statements depending  upon  a
                   particular test condition, a _____________ statement is required.
                d.   The _____________ statement causes the program to skip the rest of the statement of the current
                   block and to move to next iteration of the loop.

            3.  Answer in one or two words.
                a.  A computer program is a set of instructions which are known as?               ____________

                b.  Name any one iterative statement.                                             ____________
                c.   Which function is used to generate a list of numbers from a starting number
                   up to the number just before the ending number?                                ____________
                d.   Under which condition does a looping statement enable the repetition of task
                   under its scope?                                                               ____________

            4.  Think and answer.

                a.   What do you understand by control structure?
                   _____________________________________________________________________________




                                                                                   Control Structures in Python  115
   112   113   114   115   116   117   118   119   120   121   122