Count the positives · Contar los 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 los positivos
Devuelve cuántos números en una lista son mayores que 0. El propio cero no se cuenta.
Un contador comienza en 0 y aumenta en 1 cada vez que la condición es verdadera.
Write count_positive(nums) that returns · retornos how many numbers in the list are greater than 0. · Escribe count_positive(nums) que retorne cuántos números en la lista son mayores que 0.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.