Count Up
Return a tensor with the whole numbers from 0 up to n, not including n itself. They stay whole numbers: 0, 1, 2 and not 0.0, 1.0, 2.0.
Example 1
n 4
returns [0,1,2,3]
Constraints
0 <= n <= 60
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More PyTorch problems
- Dot ProductBeginner
- HalvesBeginner
- The Last ColumnBeginner
- The ShapeBeginner
- Twice Plus OneBeginner
- Two RowsBeginner
- A Layer by HandEasy
- Center the ColumnsEasy