Answer to Question #299862 in Python for Maria Eduarda

Question #299862

program to find the sum of even numbers in python


1
Expert's answer
2022-02-19T16:56:40-0500
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS