Write a user defined function, which can be called by passing all the 4 types of arguments. Make 4
different function calls to demonstrate the same.
Answers
Answered by
0
Answer:
Python includes many built-in functions. These functions perform a predefined task and can be called upon in any program, as per requirement. However, if you don't find a suitable built-in function to serve your purpose, you can define one. We will now see how to define and use a function in a Python program.
Explanation:
Defining a Function
A function is a reusable block of programming statements designed to perform a certain task. To define a function, Python provides the def keyword. The following is the syntax of defining a function.
Syntax:
def function_name(parameters):
"""docstring"""
statement1
statement2
...
...
return [expr]
Similar questions