FunctionRacerProblemsRace

Count Target in Grid

BeginnerNumPyPython

grid is a 2-D array of whole numbers. Return how many cells are equal to target, as an int.

Example 1

grid [[1,2,3],[2,2,9]]
target 2
returns 3

The value 2 appears three times.

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