#偶数和
for i in range(1,101):
if i%2==0:
sums1+=i
print(sums1)
#奇数和
for i in range(1,101):
if i%2!=0:
sums2+=i
print(sums2)
#质数和
i=2
for i in range(2,100):
j=2
for j in range(2,i):
if i %j ==0:
break
else:
sums3+=i
print(sums3)
转载于:https://www.cnblogs.com/yonghaha/p/8947087.html