IF loop in python

IF LOOP:

if loop is similar to all programming languages.

if will check one condition and if it is correct then it will continue the loop other wise it will terminate the loop action.

Example if loop python program :

Ex:1
c = 100
if c == 100:

    print('C value is equal to 100')

print ('thank you')


out put:



The following program The loop terminated and printing out of loop statement.

Ex:2


c = 100
if c < 100:

    print('C value is equal to 100')

print ('thank you')

Output:


thank you

Comments

Popular Posts