Decision-making

Decision-making is the anticipation of conditions occurring during the execution of a program and specified actions taken according to the conditions.

The IF statement is similar to that of other languages. The if statement contains a logical expression using which the data is compared and a decision is made based on the result of the comparison.

An else statement can be combined with an if statement. An else statement contains a block of code that executes if the conditional expression in the if statement resolves to 0 or a FALSE value.



The import Statement
When the interpreter encounters an import statement, it imports the module if the module is present in the search path. A search path is a list of directories that the interpreter searches before importing a module.

Comments

Popular posts from this blog

What Is Python

Numbers

Date and Time