FunctionRacerProblemsRace

Smallest Positive

EasyNumPyPython

Return the smallest number in nums that is greater than 0. At least one number is positive.

Example 1

nums [-4,9,3,0,6]
returns 3

The positive numbers are 9, 3 and 6; the smallest is 3.

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