Question: i. Write a for loop function that prints out numbers in the range from 0 to n, where n is supplied by the user. n

i. Write a for loop function that prints out numbers in the range from 0 to n, where n is supplied by the user. n is the argument to the function.

ii. Write a function with a while loop that returns the sum of numbers from 1 to n, where n is supplied by the user. n is the argument to the function.

*python*

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!