#!/root/kl/bin/python3
#author:kl
#1-100偶数之和
result = 0
counter = 1
while counter <=100:
counter +=1
if counter % 2 ==1:
continue
result += counter
print(result)
Python1-100偶数之和
最新推荐文章于 2024-09-14 15:10:50 发布
#!/root/kl/bin/python3
#author:kl
#1-100偶数之和
result = 0
counter = 1
while counter <=100:
counter +=1
if counter % 2 ==1:
continue
result += counter
print(result)