Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

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