Page 35 - C++
P. 35

The output of the above code will be:




                      The loop terminates when i becomes 3 due to break statement
                      Whereas,
                      continue statement is used to force the next iteration while skipping the statements in
                      the present iteration.






                      The output of the above code will be:







                      continue statement forces next iteration when i becomes 3 , bypassing the print
                      statement .Thus ,in the output 3 is missing.

                      (1 mark for  explaining break statement with example)
                      (1 mark for explaining continue statement with example)

               (b)    Identify and write the name of the module to which the following functions belong:           1
                      i. ceil( )      ii. findall()

               Ans    i.  ceil( ) -  math module
                      ii. findall( ) – re module

                      (½ mark for each module)

               (c)    Observe the following Python code very carefully and rewrite it after removing all            2
                      syntactical errors with each correction underlined.
























                                                        Page No. 18
   30   31   32   33   34   35   36   37   38   39   40