# Program to show archetypal while loop # Matt Bishop, January 26, 2012 # for ECS 10 Winter 2012 # just counts from 1 to 10 # the for loop first print("for loop counting from 0 to 4:") for i in range(5): print(i) # now, the same while loop print("while loop counting from 0 to 4:") i = 0 while i < 5: print(i) i += 1