Python-100-Days/Day01-15/Day04/for2.py

15 lines
158 B
Python
Raw Normal View History

2018-03-02 00:09:06 +08:00
"""
用for循环实现1~100之间的偶数求和
Version: 0.1
Author: 骆昊
Date: 2018-03-01
"""
sum = 0
for x in range(2, 101, 2):
sum += x
print(sum)