一、
# -*- coding: UTF-8 -*-
sum = 0
n = 100
while n > 0 :
if n%2==1:
sum = sum + n
n=n-1
else:
n=n-1
print(sum)
二、
# -*- coding: UTF-8 -*-
x=0
sum=0
for x in range(101):
if x%2==0:
sum = sum + x
print(sum)
一、
# -*- coding: UTF-8 -*-
sum = 0
n = 100
while n > 0 :
if n%2==1:
sum = sum + n
n=n-1
else:
n=n-1
print(sum)
二、
# -*- coding: UTF-8 -*-
x=0
sum=0
for x in range(101):
if x%2==0:
sum = sum + x
print(sum)