27,067 views
5 votes
5 votes
An array called numbers contains 35 valid integer numbers. Determine and display how many of these values are greater than the average value of all the values of the elements. Hint: Calculate the average before counting the number of values higher than the average

User Yussan
by
3.8k points

1 Answer

7 votes
7 votes

python

Answer:

# put the numbers array here

average=sum(numbers)/35 # find average

count=0 #declare count

for i in numbers: #loop through list for each value

if i > average: #if the list number is greater than average

count+=1 #increment the count

print(count) #print count

User Poshaughnessy
by
3.2k points