lesson6_17_ear_1

# -*- coding: utf-8 -*-
"""
examples of for and while
@authors: katkaranikola stkarlos
"""

s = 0
for i in range(1,1001):
  #print i
  s = s + i
print s
print ' telos for '

print 'the same implementation through while'
s = 0 
i = 1 #point1
while (i <= 1000 ): #point3
  #print i
  s = s + i
  i = i + 1 #point2
print s
print 'telos while'

 

Posted in Uncategorized