FunctionRacerProblemsRace

Count Positives

BeginnerNumPyPython

Return how many numbers in nums are greater than 0, as an int. Try a comparison like nums > 0 and then add up the True values.

Example 1

nums [3,-1,0,7,-4]
returns 2

Only 3 and 7 are above zero.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems