#coding=utf-8 ########################### #求1到10,20到30,30到40之和 ########################### sum=0 for i in range(1,10): sum+=i print("Sum from 1 to 10 is ",sum) sum=0 for i in range(10,20): sum+=i print("Sum from 1 to 10 is ",sum)
黑洞@heidsoft
Github:https://github.com/heidsoft
微博:http://weibo.com/liuganbin
热衷云计算和大数据
关注CloudStack,OpenStack,Linux c/c++/python/java
关注研究新技术