Pramod Ray
1 min readSep 9, 2019

Day-5

Comparison Operator : Comparison Operator compare two value give output is Boolean value ex -[ == equal to, != Not equal to, < less than, > grater than, <= less tha or equal to, >= greater than or equal to

Condition Statement : There 3 types statement

1 if statement : It executes a set of statement conditionally,

If expression:

statement 1

statement 2

If.. else : it has two block . Else block is optional blocks.

If expression:

statement1

Statement2

else :

Statement3

….

If..elif…else: In this type we can write several condition which specific block

If expression:

statement1

elif expression:

statement2

else:

statement2

…..

Loop Statement : Loop are used to repeatedly execute the block of code.

There are 3 types of loop

  1. While loop
  2. do while
  3. For loop

While loop: loops are used to repeatedly executes a block of code when loop satisfied with appropriate condition

Syntax

While(condition):

statement..

Break and Continue

  • The break statement are used the execution flow are suddenly jumped out in loop
  • It is also used if else condition .

Ex :-

if expression:

Break

Pramod Ray
Pramod Ray

No responses yet