Following is a sample program in python that shows how comments, statements, function definitions and function calling are done.
Here in this code, we see many components that work together in a python program. These components are:
Comments: Comments are the lines beginning with a hash (#) symbol. These lines are not executed by the compiler. These are kept in the program just for convenient readability of the source code.
Blocks: A block is any set of statements that has a header and some statements inside of its body. Header is identified by a colon (:) ate the end and statements inside of the body are identified by an indent in the beginning.
Statements: Although every individual line in a python program can be called as a statement but more specifically the line that has some variables, literals, arithmetic or logical parts in it is better to say a statement.
The print() statement: Every word that is followed by a parenthesis () is called a function. Therefore print() is also a function that is used to display something on the console as output of the program.
Function calling: In general, it is also a statement. It is used to call or execute a function that is defined either already in the python library or in a python module or in the program itself.
NOTE: Function definitions are always in blocks and callings are always in statements.