Page 127 - Trackpad_V4.0_C8_Flipbook
P. 127

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.












                                                                                   Functions and String  in Python  125
   122   123   124   125   126   127   128   129   130   131   132