Answered step by step
Verified Expert Solution
Question
1 Approved Answer
?Using Phyton 3.6. Beginners 1. Write definitions for the following two functions: sumN(n) returns the sum of the first n natural numbers sumNCubes(n) returns the
?Using Phyton 3.6. Beginners
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 choiceStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started