Question: PYTHON PYTHON PYTHON Problem-1 (25 marks) Write a Python program using user defined function to calculate the value of sin(x) up to n terms using

 PYTHON PYTHON PYTHON Problem-1 (25 marks) Write a Python program using
PYTHON PYTHON PYTHON

Problem-1 (25 marks) Write a Python program using user defined function to calculate the value of sin(x) up to n terms using the following series, 72 x2k+1 sin(x) - ( 1) -1) (2k + 1)! where x is in radians. To convert degree to radian, use X=degree*(pi/180). Take pi=3.141592. For example, n=2, we can expand the series of sin as follows, X x3 sin(x) + 1! 3! 5! ts 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!