def he(): sum1=0 for i in range(2,100,2): if i%2==0: sum1+=i print("1-100的偶数和为",sum1) sum2=0 for j in range(1,100,2): if j%2!=0: sum2+=j print("1-100的奇数和为",sum2)he()