FunctionRacerProblemsRace

Rows With a Zero

EasyNumPyPython

Return how many rows of the 2-D array grid contain at least one 0. A row with several zeros still counts once. Hint: .any(axis=1).

Example 1

grid [[1,0,2],[3,4,5],[0,0,1]]
returns 2

Rows 0 and 2 contain a 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