Computer Science, asked by PrateekKishore7519, 10 months ago

Write a program that take an array s as an argument and add all the odd values and display the sum .
In python

Answers

Answered by harshini61999
0

Answer:

def oddsum(s):

sum=0

for i in s[1::2]:

sum+=i

return sum

n=list(map(int,input().split()))

print(oddsum(n))

Similar questions