Evenly Spaced
Return count numbers that are equally far apart, where the first is start and the last is stop (both included). For example 0, 10 and 5 numbers gives 0, 2.5, 5, 7.5, 10. Hint: np.linspace.
Example 1
start 0
stop 10
count 5
returns [0.0,2.5,5.0,7.5,10.0]
The step between neighbors is 2.5.
Constraints
2 <= count <= 20
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More NumPy problems
- Every Other SumBeginner
- Hottest DayBeginner
- Lower Triangle TotalBeginner
- Median ScoreBeginner
- Multiples Up ToBeginner
- Overlap CountBeginner
- Pass or FailBeginner
- Percent of TotalBeginner