A named series of statements that performs some useful operation is referred to as a function.
Functions sometimes can take or don't take arguments. Similarily, they can generate or don't provide a result.
function definition: A statement that specifies the name, parameters, and statements that make up a new function.
A value formed by a function definition is referred to as a function object. The function's name is a variable that points to a function object.
The first line of a function definition is called the header.
The sequence of statements within a function definition is referred
to as the body.
Parameter: A
name given to the value delivered as an argument in a function.
A Statement that performs a function is
referred to as a function call. The function name is
followed by a list of arguments in parentheses.
When a function is called, it is given a value as an
argument.
This value is assigned to the function's appropriate parameter.
A variable defined within a function is
referred to as a local variable. A local variable can only be used
within the function in which it was created.
The outcome of a function is its return value. When a
function call is used as an expression, the result is the expression's
value.
A function that returns a value is called a
fruitful function.
A function that always returns None is known as a
void function.
None is a particular value that void functions return.
A module is a file that contains a group of related
functions and definitions.
A statement that reads a module file and constructs a module object is
known as an import statement.
A value formed by an import statement that allows access to the values
defined in a module is referred to as a module object.
The syntax for invoking a function in another module by
supplying the module name, a dot (period), and the function name in
dot notation.
Using an expression as part of a larger expression or a statement as
part of a larger statement is known as composition.
The sequence in which the statements are executed is called the
execution flow
Copyright © 2022-2023. Anoop Johny. All Rights Reserved.