Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note : you may not use list comprehensions or similar Python constructs not taught yet in this course. Use while loops (or for loops, except

image text in transcribed

Note: you may not use list comprehensions or similar Python constructs not taught yet in this course. Use while loops (or for loops, except while required in Q4) for iteration. You may not use any string methods other than .lower()

this is a python work, i don't know how to do this, i need you help, thanks you very much!

4. Pi is an irrational number whose first digits are: 3.1415928. The precise value of pi is equal to the infinite sum: pi = 4/1-4/3 + 4/5-4/7 + 4/9-4/11 + You can compute better and better approximations of pi by computing more terms of the series. Write function approxPi(deltaValue) that computes and returns an approximation of pi. Use a while loop (not a for loop) Each iteration should update the pi approximation by including one additional term from the series. The loop should terminate when the difference between the previous iteration's approximation and the new iteration's approximation is less than deltaValue. For example approxPL(.01) 3.1465677471829556 >>>approxPi(-00S) 3.14408641529861 approxPi 00001) 3.141597653564762

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

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

2, What behaviors does this leader engage in'!

Answered: 1 week ago