# Calculates the sum from 1 to 100. n-= 100 SUM = 0 counter =. 1 the while counter <= n-: SUM + = counter counter + =. 1 Print ( " . 1 to% d sum of:% d " % (n-, SUM) )
result:
# Calculates the sum from 1 to 100. n-= 100 SUM = 0 counter =. 1 the while counter <= n-: SUM + = counter counter + =. 1 Print ( " . 1 to% d sum of:% d " % (n-, SUM) )
result: