Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 101 - 2607_Traclpad_Pro_5.1_flipbook_C8
P. 101

    Periodic Assessment                          3

                                                         (Based on chapters 5 & 6)

                      1.  What will be the output of the following Python codes?

                         a. i = 0
                          while (i <= 5):

                              print("Hello Trackpad")

                              i += 1
                         b. i = 0
                          while i < 5:

                              print(i)
                              i += 1

                              if i == 3:
                                  break
                              else:

                                  print(0)
                      2.   Write a  program  to print  the even numbers  between 1 and  25 by  using  the  continue
                         statement.

                      3.  Write the use of the following functions:

                         a. len() ________________________________________________________________

                         b. append() _____________________________________________________________

                         c.  capitalize() ___________________________________________________________

                         d. del ________________________________________________________________

                      100   Premium Edition-VIII                                                                                                                                                                             Periodic Assessment 3  PB

| 96 97 98 99 100 101 102 103 104 105 106 |