Count the positives · Contar os positivos
Count the positives
Return how many numbers in a list are greater than 0. Zero itself does not count.
A counter starts at 0 and grows by 1 each time the condition is true.
Contar os positivos
Retorne quantos números em uma lista são maiores que 0. O próprio zero não conta.
Um contador começa em 0 e aumenta em 1 cada vez que a condição é verdadeira.
Write count_positive(nums) that returns · decrescentes how many numbers in the list are greater than 0. · Escreva count_positive(nums) que retorne quantos números na lista são maiores que 0.
Click Run to see the output here. · Clique em Executar para ver a saída aqui.