CONDITIONAL STATEMENTS IN PYTHON

PYTHON CONDITIONAL STATEMENTS There are situations in real life when we need to make some decisions and based on these decisions, we decide what we should do next. Similar situations arise in programming also where we need to make some decisions and based on these decisions we will execute the next block of code. Conditional statements in Python languages decide the direction(Control Flow) of the flow of program execution. Types of S tatements in Python There are 4 types of Statements in Python... 1. The if statement 2. The if-else statement 3. The nested-if statement 4. The if-elif-else ladder if statement The if statement is the most simple decision-making statement. It is used to decide whether a certain statement or block of statements will be executed or not. Syntax: if condition: # Statements to execute if # condition is true Here, the condition after evaluation will be either true or false. if the statement accepts boolean values-if the value is true the...