whenever you need to carry out that action we are already repeating ourselves in our codeso this is good time to introduce simple functions functions mean less work for us as programmersand effective use of functions results in code that is less error function calls what is function in pythonin pythona function is group of related statements that performs specific task functions help break our program into smaller and modular chunks as our program grows larger and largerfunctions make it more organized and manageable furthermoreit avoids repetition and makes the code reusable syntax of function def function_name(parameters)"""docstring""statement(sabove shown is function definition that consists of the following components keyword def that marks the start of the function header function name to uniquely identify the function function naming follows the same rules of writing identifiers in python parameters (argumentsthrough which we pass values to function they are optional colon (:to mark the end of the function header optional documentation string (docstringto describe what the function does one or more valid python statements that make up the function body statements must have the same indentation level (usually spaces an optional return statement to return value from the function exampledef greeting(name)""this function greets to the person passed in as