DAY 14 of PYTHON top 100 questions : from Basic to Advanced !!
Write a Python program to find the sum of all odd numbers between 1 and a given number.
n=int(input("enter the number"))
sum=0
for i in range(0,n+1):
if i%2!=0:
sum+=i
print(sum)
Output :
enter the number10
25
The input() function is u...
priyachakraborty.hashnode.dev1 min read