Pass or Fail
Return a list of strings, one per score in scores: "pass" if the score is 50 or more, otherwise "fail". Hint: np.where.
Example 1
scores [72,49,50]
returns ["pass","fail","pass"]
72 passes, 49 fails, 50 passes.
Constraints
1 <= len(scores) <= 100
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More NumPy problems
- Percent of TotalBeginner
- Pick ItemsBeginner
- Price With TaxBeginner
- Range of ReadingsBeginner
- Recent AverageBeginner
- Running TotalBeginner
- Same PositionsBeginner
- Shopping TotalBeginner