Python includes exercises 45
Title: Statistical 1-100 sum.
Program Analysis: None
Source Code:
#!/usr/bin/python # -*- coding: UTF-8 -*- tmp = 0 for i in range(1,101): tmp += i print 'The sum is %d' % tmp
The above example output is:
The sum is 5050