Task 2: (50 points) Write a script that will ask the user to input an error tolerance and call a function to estimate th

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Task 2: (50 points) Write a script that will ask the user to input an error tolerance and call a function to estimate th

Post by answerhappygod »

Task 2 50 Points Write A Script That Will Ask The User To Input An Error Tolerance And Call A Function To Estimate Th 1
Task 2 50 Points Write A Script That Will Ask The User To Input An Error Tolerance And Call A Function To Estimate Th 1 (37.48 KiB) Viewed 26 times
Task 2: (50 points) Write a script that will ask the user to input an error tolerance and call a function to estimate the mathematical constant, n. Estimate the value of it with an error less than the user-specified error tolerance. Error of the estimated value is calculated as the absolute value of the difference between the estimated value and the actual value of A. Have the user input a (positive) error tolerance value BETWEEN 1.0 x 10-2 and 1.0 x 10-6. Include error handling to make sure that the user inputs a number in the specified range without terminating the function if incorrect input is given. Calculate the value of at using the following Taylor Series expansion: 4 Σ(-1)*, 4 = 4 2n + 1 + 4 5 4 7 + .. = TC n=0 Since it is not practical to add an infinite number of terms, include the number of terms that is required to produce the first sum that gives a value with an error that is less than the error tolerance. Output the number of terms required to determine A within the error tolerance, the estimate of , and the resulting error.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply