Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

10. Suppose that you want to obtain the following sum 21+41+81+161+2n1 for some positive number n and that you created the following Python function: What

image text in transcribed
image text in transcribed
10. Suppose that you want to obtain the following sum 21+41+81+161+2n1 for some positive number n and that you created the following Python function: What would you change in the function to make the calculation correct? (A)I wouldn't change a thing since the function is already correct. (B) I would change the range such that it goes up to n. instead of n+1. (C) I would replace x=I/(2i) with x=x+1/(2i). (D) I would replace x=0 with x=1. 10. Suppose that you want to obtain the following sum 21+41+81+161+2n1 for some positive number n and that you created the following Python function: def sum_geometric_series (n) : x=0 for i in range (1,n+1) : x=1/(2i) return x What would you change in the function to make the calculation correct? (A) I wouldn't change a thing since the function is already correct. (B) I would change the range such that it goes up to n, instead of n+1. (C) I would replace x=1/(2i) with x=x+1/(2i). (D) I would replace x=0 with x=1

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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

Which described qualities do you agree with?

Answered: 1 week ago