Monday, December 7, 2020

python day6 if,elif,else,while,range

 i,j=4,6

'''

if i==5:

    print("thi is if loop")

    

elif i==4 and j==5:

    print(i,j)


elif i==4 or j==5:

    print("elif two:",i,j)

        

else:

    if i==4:

        print("this is else loop")

    else:

        #print("this is else else loop")

        if i==3:

            print("this is else else if loop")



#break execution:

while(1):

    print("this is sams")

    break


while(1):

    while(1):

        print("this is sams")

        break

    print("this is nag")

    break

    


#range(start,stop,step)


for i in range(-10,100,10):

    print(i)


a=0

a=range(1,10,2)

print(a)

'''



    


No comments:

Post a Comment

python class topic video