Challenge 2: Return Numbers From n Down to 0

Solve a challenge to iterate through a list in reverse order.

Problem Statement

Edit the following class, such that it returns all numbers from n down to 0.

Input

A number n

Output

The range of numbers from n down to 0

Sample Input

8

Sample Output

[8, 7, 6, 5, 4, 3, 2, 1, 0]

Coding Exercise

Write your code below. It is recommended​ that you try solving the exercise yourself before viewing the solution.

Get hands-on with 1000+ tech skills courses.