InterviewSolution
Saved Bookmarks
| 1. |
Write a program that take an array s as an argument and add all the odd values and display the sum . In python |
|
Answer» def oddsum(s): sum=0 for i in s[1::2]: sum+=i return sumn=list(MAP(int,input().SPLIT()))print(oddsum(N)) |
|