Question: Python 3.6 1. Write definitions for the following two functions: sumN(n) returns the sum of the first n natural numbers sumNCubes(n) returns the sum of

Python 3.6

Python 3.6 1. Write definitions for the following two functions: sumN(n) returns

1. Write definitions for the following two functions: sumN(n) returns the sum of the first n natural numbers sumNCubes(n) returns the sum of the cubes of the first n natural numbers. Then use these functions in a program that prompts a user for n andprints ut the sum of the first n natural numbers and the sum of the cubes of the first n natural numbers. 2. Write and test a function to meet this specification. s) nums is a list of numbers. Modifies the list by squaring squareEach(num each entry 3. Write and test a function to meet this specification. sumList(r is a list of numbers. Returns the sum of the numbers in the list. 4. Write a function called averageNumbers that finds and return the average of 3 integers. The 3 integers are passed as input parametersto the function. Write a test for your function with 3 numbers ofyour choice

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!