Page 140 - 2622_Delhi Police Public School_C-8
P. 140

5.  Visiting each element and processing it as required by the program is called ___________.

                                a. functions                                  b. strings


                                c. traversing                                 d. indexing

                     Fill in the blanks with the correct words.



                                       Hints  Double, \t, arguments, single,\n, positive, upper(), three


                      1.  The inputs given to the functions are referred to as _______________ .

                      2.  A string is enclosed or surrounded by _______________ or _______________ quotes.
                      3.  A multiline string in Python begins and ends with _______________ single quotes.

                      4.   _______________ is an escape sequence for adding a new line and _______________ is an escape sequence
                         for adding a tab.

                      5.  Index with _______________ integers starts from 0.

                      6.  _______________ function converts all lowercase letters to uppercase.




                Q    Answer the following questions:
                  A
                      1.  How can you define a function in Python?








                      2.  How does a built-in function differ from a user defined function? Explain with example.













                      3.  If name= “RAKESH Mishra”, use it with len(), lower(), upper() and capitalize() and write the output.







                      4.  How do you pass arguments to a Python function? Explain with an example.












                        Premium Edition-VIII
                138
   135   136   137   138   139   140   141   142   143   144   145