Count Between
Return how many values in nums are between low and high, including both ends. Hint: combine two comparisons with & (and put each in parentheses).
Example 1
nums [1,5,8,10,12]
low 5
high 10
returns 3
5, 8 and 10 are all in the range.
Constraints
1 <= len(nums) <= 100low <= high
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More NumPy problems
- Count IncreasesEasy
- Count Sign ChangesEasy
- Drop Lowest AverageEasy
- Empty SeatsEasy
- Fill MissingEasy
- First Day Over LimitEasy
- Full ColumnsEasy
- Good ColumnsEasy