While loop in python

Total Post:113

Points:791
 322  View(s)
Ratings:
Rate this:

Explain while loop in python ?

  1. Post:140

    Points:984
    Re: While loop in python

    The while Loop in python : 

    Example:

    i = 1 
    while i < 5:
      print(i)
      i += 1

    Break statement : 

    EX:

    i = 1 
    while i < 5:
      print(i)
      if i == 3:
        break
      i += 1


    continue statement:

    Ex:

    i = 0 
    while i < 5:
      i += 1
      if i == 3:
        continue
      print(i)


Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.