Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 88 - 2612_Digimind
P. 88

    c.   The _______________ loop is used when the number of iterations is known.
                          d.   The _______________ statement is used to skip the rest of the current iteration of a loop and move
                             to the next iteration.

                          e.  The _______________ statement is used for exiting the program control out of the loop.
                      3.  Write 'T' for true and 'F' for false.

                          a.  An iteration means one pass of a loop.

                          b.  A sequence is a succession of values bound together by a single name.

                          c.  range(stop) generates a set of whole numbers starting from ‘start’ to ‘stop–1’.

                          d.  Jump statements alter the flow of control unconditionally.

                      4.  Answer in one or two words.
                          a.   Name the type of control structure that repeats a block of code based on
                             a condition.                                                                 _______________

                          b.   What is the programming construct that affects the flow of execution in
                             a program?                                                                   _______________

                          c.   Name the statement that is used to skip the current iteration in a loop
                             in Python.                                                                   _______________

                          d.  Name the values that are optional in the range() function.                  _______________

                      5.  Think and answer.
                          a.  What is a control structure?

                             ______________________________________________________________________________

                             ______________________________________________________________________________

                          b.  Define range() funciton.
                             ______________________________________________________________________________

                             ______________________________________________________________________________

                          c.  How does the continue statement differ from the break statement in loops?

                             ______________________________________________________________________________

                             ______________________________________________________________________________

                             ______________________________________________________________________________

                          d.  Write the syntax of the following:
                              (i)  while Loop

                             ______________________________________________________________________________

                             ______________________________________________________________________________

                       86   Premium Edition-VIII

| 83 84 85 86 87 88 89 90 91 92 93 |