write a python statement to create an integer array of size 10 and calculate the average value of array elements
Answers
Answered by
0
Answer:
very simple with a for loop
Explanation:
list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
a = 0
for x in list:
a = a + x
b = a / 10
print(b)
simplified obviously, you can use a while loop or a random number generator to create better lists
Similar questions