WHILE LOOP IN PYTHON

Photo of author

By Jackson Taylor

PROGRAM
n=6
while n>0:
  n=n-1
  print ‘hai’
OUTPUT
hai
hai
hai
hai
hai
hai
more examples