Answer to Question #221420 in Python for Hari nadh babu

Question #221420

Sum of Odd Numbers


This Program name is Sum of Odd Numbers. Write a Python program to Sum of Odd Numbers


The below link contains Sum of Odd Numbers question, explanation and test cases


https://drive.google.com/file/d/1XyawxIFSDpbEnTwPW0j0uCVJ1vPZ_ysM/view?usp=sharing


We need exact output when the code was run

1
Expert's answer
2021-08-02T07:16:15-0400
N=int(input())
sum1=0
for i in range(N+1):
    if i%2 !=0:
        sum1+=i
print(sum1)

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