Question: Having trouble with part D of this question. My Python code for part c looks like this: ------------------------------------------------------------------------------------------ n = int(input('Enter a number')) total=0 i=1

Having trouble with part D of this question.

Having trouble with part D of this question. My Python code for

My Python code for part c looks like this:

------------------------------------------------------------------------------------------

n = int(input('Enter a number'))

total=0

i=1 j=n

while (i

Thanks.

value. Construct a program that accepts an arbitrary integer input by the user and calculates the following summation as an example where n = 30. 30 29 +28+...+29+ 30 Some test values: f(5) = 8.7, f(10) = 22.219, f(30) = 93.845 (d) Using the code you constructed for part (c), now build a single program that adds up the totals for the input values of 1 through n, your input value. Some test values: f(5) = 22.95, f(10) = 105.811, f(30) = 1269.014

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!