Question: How do I write a program in Python that that uses the formula sin(x) = x-x 3 /3! + x 5 /5! - x 7
How do I write a program in Python that that uses the formula sin(x) = x-x3/3! + x5/5! - x7/7! + x9/9! - x11/11! + . . . to compute and display an approximation of sin(x). I have to prompt the user to enter a value for x. After each computation, ask the user of he or she wants to do it again. If so, then repeat the computation for another value of x. The program must include a function that computes and returns the value of sin(x). Must use the first 20 terms of the formula to do the computation and I can't use the predefined function that is available in one of the standard Python modules.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
