Num = str(input("Enter numbers followed by SPACE: ")).split(" ")
Sum=0
n=0
for r in range(0,len(Num)):
if(int(Num[r])%2==1):
Sum = Sum + int(Num[r])
n=n+1
print("Sum of Odd Numbers : ",Sum)
print("Avg. of Odd Numbers: ",(Sum/n))
Comments
Leave a comment