为什么这个运行等于0
num = 1
sum = 0
mo = num % 2
while True:
if num > 1000:
break
if mo == 0:
sum = sum + num
num = num + 1
print (sum)
num = 1
sum = 0
mo = num % 2
while True:
if num > 1000:
break
if mo == 0:
sum = sum + num
num = num + 1
print (sum)
2022-10-27
举报