Question: 1. (8 points) Write Python code to define the following function. Use pythontutor.com to check that your code does what it should. Submit a screenshot
1. (8 points) Write Python code to define the following function. Use pythontutor.com to check that your code does what it should. Submit a screenshot of your code. Write a function sumOfCubes(List)that computes the sum of the cubes of the numbers in the List and returns the result. Make sure to write your code so that it works no matter how many iterns are in the list, Examples: sumOfCubes([1. 3. 4)) returns 92 because 1 + 27 +64 = 92) sumOfCubes((2, -3, -1]) returns --20 (because 8 - 27-1=-20). def sumOfCubes List )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
