Challenge 6: List of Cubes

In the previous challenge, you created a list containing squares. Now let's try to generate a list containing cubes of numbers.

Problem Statement

Given a getCube() function, create a list with the cubes of the first 20 numbers.


An empty list


An updated list with the cube of each value in the list

Get hands-on with 1000+ tech skills courses.