InterviewSolution
Saved Bookmarks
| 1. |
Write a program to illustrate “Required arguments”. |
|
Answer» #!/usr/bin/python # Function definition is here def printme (str): “This prints a passed string into this function” print str; return; # Now you can call printme function printme(); It produces following result: Traceback (most recent call last): File “test.py”, line 11, in <module> printme() TypeError: printme() takes exactly 1 argument (0 given) |
|