pyrebot

Better not to ignore the past but learn from it instead. Otherwise, history has a way of repeating itself.

博客园 首页 新随笔 联系 订阅 管理

2013年11月9日 #

摘要: #1、计算1000以内3与5的倍数的总和 1 import math 2 3 nums = 0 4 5 for i in range(0,1000): 6 7 if i%3 == 0 or i%5 == 0 : 8 9 if i != 0:10 11 nums = nums + i12 13 else:14 15 continue16 17 print numsView Code 阅读全文
posted @ 2013-11-09 22:21 pyrebot 阅读(159) 评论(0) 推荐(0) 编辑