Question #299862

program to find the sum of even numbers in python


Expert's answer

N = int(input("Enter n: "))
result=0;
for r in range(0, N+1):
    if r %2==0:
        result+=r
    
print(f"The sum of even numbers: {result}")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS