Python: #计算并输出1~100之间的奇数之和与偶数之和fromfunctoolsimportreduceprint("evenSum=",end='')print(reduce(lambdaa, b: a + b, filter(lambdai: i%2 == 0, [iforiinrange(1,101)])))print('oddSum=', end='')print(reduce(lambdaa, b: a + b, filter(lambdai: i%2 == 1, [...
s=0 for i in range(1,1,100):s+=i
Python:#计算并输出1~100之间的奇数之和与偶数之和 from functools import reduce print("evenSum=",end='')print(reduce(lambda a, b: a + b, filter(lambda i: i%2 == 0, [i for i in range(1,101)])))print('oddSum=', end='')print(reduce(lambda a, b: a + b, filter(lambda i:...