Question: Python. Deliverables: 1) Write the following using functions: . Part 1 - sumN(n) - returns the sum of the first n natural numbers Part 2
Deliverables: 1) Write the following using functions: . Part 1 - sumN(n) - returns the sum of the first n natural numbers Part 2 - sumNCubes(n) - returns the sum of the cubes of the first n natural numbers Both programs should prompt the user for n and prints out the sum of the first n natural numbers and the sum of the cubes of the first n natural numbers. 2) Write a function for calculating the area of a rectangle 3) Write and test a function for the following: squareEach(nums) - nums is a list of numbers. Modifies the list by squaring each entry. 4) Write and test a function for the following: sumListinums)-nums is a list of numbers. Returns the sum of the numbers in the list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
