arr = list(map(int, input('Enter array of numbers: ').split()))
sum = 0
for i in arr:
if i % 2 != 0:
sum += i
print(f'Sum of odd elements is {sum}')
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
arr = list(map(int, input('Enter array of numbers: ').split()))
sum = 0
for i in arr:
if i % 2 != 0:
sum += i
print(f'Sum of odd elements is {sum}')