Range Vector

easynumpy_basics

Implement range_vector(lo, hi).

Return a 1D array of the consecutive integers from lo up to but not including hi (lo, lo+1, ..., hi-1). For example, range_vector(10, 50) ranges from 10 to 49. No for/while loops.

Constraints
  • no for/while loops

Your solution

Edit range_vector and run the real pytest suite in your browser — no install required. Your code is saved locally.

⌘/Ctrl + ↵

Loading the Python runtime (first run only)…

Hints

Hint 1

np.arange(lo, hi) yields lo, lo+1, ..., hi-1.