Write a python program that asks the user to input six numbers and then print the summation and average of odd numbers only.
Sample Input:
3
5
2
4
8
9
Sample Output: Summation is 17 and average is 5.666666666666667
1
Expert's answer
2021-08-27T02:04:06-0400
n=input('Enter the integers seperated by comma :')
x=n.split(',')
z=[]
for i in x:
ifint(i)%2!=0:
z+= [int(i)]
print(z)
print('sum',sum(z))
print('average',sum(z)/len(z))
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments