1
I’m having trouble with the following question: Write a python function that you receive as parameter a real tuple. The function should return the average and the amount of values greater than the average.
And then I arrived at the following result :
def somar_elementos(lista):
soma = 0
media = 0
for numero in lista:
soma += numero
media = soma / numero
return media
a=(5, 10, 6, 8)
print(somar_elementos(a))
However, I do not know how to continue from here to find the amount of numbers larger than the average