Computer Science, asked by sonusagar50, 1 month ago

what is function in python? give some example of it.​

Answers

Answered by dhargalkardurva44
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 techifyarya
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