what is function in python? give some example of it.
Answers
Answered by
3
Answer:
Function in Python is defined by the "def " statement followed by the function name and parentheses ( () ) Example: Let us define a function by using the command " def func1():" and call the function. The output of the function will be "I am learning Python function".
Answered by
3
Answer:
Functions is a module use to accomplished a certain task
Explanation:
Two types of functions in python -
A. Pre-defined function / In-built function
like - print(), input(), .random(), map() etc
B. User-defined function
In which we can create our own function.
To create a user-defined function in python def keyword is used.
Similar questions
English,
17 days ago
History,
1 month ago
English,
8 months ago
India Languages,
8 months ago
Science,
8 months ago