explain def program in phyton
Answers
Answered by
1
I HOPE THIS WILL HELP YOU ^_^
Attachments:
Answered by
1
Answer:
def is short for “define”. It's a keyword that you need to define a function (aka method). All the code that you put between the def function_name(parameters) and end will be executed every time you call the function_name later.
Explanation:
You can define functions to provide the required functionality. Here are simple rules to define a function in Python. Function blocks begin with the keyword def followed by the function name and parentheses ( ( ) ).The statement return [expression] exits a function, optionally passing back an expression to the caller.
Similar questions