User Defined function helps in the programs where functions repeatedly used,so it helps to save your steps and most important time for writing program.
User Defined function can be divided in several parts like
def: This is keyword which introduces the name of the Function.
function_name: Function name can be alphabetical or alphanumeric name but it should not contains symbols in it.
argument:Arguments always should write in parentheses.Argument is not mandatory but parentheses are mandatory.That means you can keep parentheses empty.
colon(:): A colon which is mandatory follows the closing parenthesis and indicates the start of your function source code.
function_code: The function code should me intended under the def statement.
Continue reading