result=0 while n<=100:if n % 2 == 0:result=result+n n=n+1 print(f"计算结果等于: {result}")
encoding: utf-8# Python 3.9.0n=1s=0while n<=100: if n % 2 == 0: s=s+n n=n+1print(s)