Challenge: List of Cubes
Test yourself and implement what you have learned so far in this chapter.
We'll cover the following
Problem statement
You have to create and populate a list of cubes given a list of integers.
Input
The input is the list integers
.
integers
has already been declared for you.
Output
The output will be cubes
which should include the cubes of the items in integers
.
Sample Input
[1,2,3]
Sample Output
[1,8,27]
Test yourself
Write your code in the given area. Try the exercise by yourself first, but if you get stuck, the solution has been provided. Good luck!
Create a free account to access the full course.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy