Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed?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 choice

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

3. Evaluate a Web-based training site.

Answered: 1 week ago