Guest User

Untitled

a guest
Jul 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. numbers = []
  2. dataset = 6
  3.  
  4. def whileloop():
  5.     i = 0  
  6.     while i < dataset:
  7.         print "at the top i is %d" % i
  8.         numbers.append(i)
  9.  
  10.         i = i + 1
  11.         print "numbers now: ", numbers
  12.         print "at the bottom i is now %d" % i
  13.  
  14.  
  15.     print "the numbers: "
  16.  
  17.     for num in numbers:
  18.         print num
  19.  
  20. whileloop()
Add Comment
Please, Sign In to add comment