Monday , October 23 2017
Home / Python / Python Conditional Statements

Python Conditional Statements

Any expression which returns either true or false that expression is known as condition.

Python Conditional Statements :

The Python Conditional statements are used to decide whether the code has to be execute or skip based on evaluation of the expression.

Elements of Conditional Statements :

While working with conditional statements we use two elements :

  1. Condition
  2. Block

Condition : Any expression which returns either true or false that expression is known as Condition.

Block : All the statements which are falling under the same space indentation is known as Block.

  • Blocks begins with when the indentation increases.
  • Blocks can contain multiple blocks.
  • Blocks ends when indentation decreases to zero or to a containing blocks indentation.

Typically Python supports three conditional statements, there are :

  1. if (or) simple if
  2. if else
  3. elif

Happy Learning 🙂

About chandrashekhar

Hi Folks, you have reach this so far, that shows you like what you are learning. Then why don't you support us to improve for bettor tutorials by leaving your valuable comments and why not you keep in touch with us for latest updates on your favorite blog @ facebook , twitter , Or Google+ ,

Recommended

Convert any Number to Python Binary Number

We have discussed in the previous tutorials, how to handle different types of number systems …

Leave a Reply

Your email address will not be published. Required fields are marked *