Average of a list · Média de uma lista
Average of a list
Return the mean of a list: the total divided by how many numbers there are.
len(nums) tells you how many items the list has. Dividing with / always gives a decimal, so the average of 1 and 2 is 1.5.
Média de uma lista
Retorne a média de uma lista: o total dividido pela quantidade de números.
len(nums) diz quantos itens a lista tem. Dividir com / sempre resulta em decimal, então a média de 1 e 2 é 1.5.
Write average(nums) that returns · decrescentes the mean: the total divided by how many numbers there are. The list is never empty. · Escreva average(nums) que retorne a média: o total dividido por quantos números há. A lista nunca está vazia.
Click Run to see the output here. · Clique em Executar para ver a saída aqui.