Question: Write a Python program using user defined function to calculate the value of sin(x) up to n terms using the following series, sin(x) 15 (2k
Write a Python program using user defined function to calculate the value of sin(x) up to n terms using the following series, sin(x) 15 (2k + 1)! ko where x is in radians. To convert degree to radian, use x=degree (pi/180). Take pl=3.141592. For example, n=2, we can expand the series of sin(x) as follows, sin(x) + 3! 5! Don't use numpy in this problem. In this python program, ask the user to enter the angle in degree and any number of terms, n, as integers and get or print the value of sin(x) as output. Plot the figure that shows how sin(x) varies with number of terms (n) for the fixed degree value. In a figure, keep the values of sin(x) in y-axis and variation in x axis. You can use matplotlib
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
