Computer Science, asked by sahanabahadduri, 11 months ago

write python program to find sum of even numbers and product of odd numbers in entered list

Answers

Answered by HARSHGODS
7

L=eval(input("enter a list of numbers : "))

c=0

d=1

for k in L:

if k%2==0:

c+=k

else:

d*=k

print("Sum of even numbers in ",L," is ",c)

print("Product of odd numbers in ",L," is ",d)

Hope this helps

Similar questions