Interviews2 answers
What are functions in Python?
2 Answers
Function is a block of code . In python using definitely we can create a function.
Example
def show ():
print ('Hello')
show()
Md SarfarajPosted Jul 23, 2019, 10:31 PM EDT
functions are user-defined or system-defined, they are chuck of code that is defined to achieve a particular task.
Functions are also useful when we need to repeat a given task. Hence no need to write code again and again
Syntax:
def [function_name]:[task_defination]
Rohit GuptaPosted Jul 9, 2019, 8:08 PM EDT


