Page 123 - 2620_Birla Open Mind C-8
P. 123

2.   Any                  value in the while loop indicates an always true condition whereas zero
                           indicates                   condition.
                        3.  The                   loop never ends.
                        4.  The                   and                   are the jump statements in Python.

                 C.      Tick ( ) the correct statements and cross ( ) the wrong ones.


                        1.  The break statement is used inside the if statement.

                        2.  The continue statement breaks the loops one by one.


                        3.   To come out of the infinite loop, we can either close the program window or press Ctrl + C.

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


                        5.  The while statement is the looping statement.

                 D.  Answer the following questions:

                        1.  What are looping statements?







                        2.  Write the syntax of the for loop.








                        3.   What is the use of Jump statement?







                        4.  Draw the flowchart of the while loop.







                        5.   Define the use of while statement with the help of an example.







                        6.   Distinguish between continue and break statements.









                                                                                                   #Loops in Python 121
   118   119   120   121   122   123   124   125   126   127   128