Below is the implementation:<\/strong><\/p>\n# importing math module\r\nimport math\r\n# function which returns sum of sine series\r\n\r\n\r\ndef sumsine(degrees, terms):\r\n # taking a variable which stores sum of sine series\r\n sumSeries = 0\r\n for i in range(terms):\r\n # getting sign\r\n signofNum = (-1)**i\r\n # pie value\r\n pievalue = 22\/7\r\n # degree value of given number\r\n degval = degrees*(pievalue\/180)\r\n sumSeries = sumSeries + ((degval**(2.0*i+1)) \/\r\n math.factorial(2*i+1))*signofNum\r\n # returning the sum of sine series\r\n return sumSeries\r\n\r\n\r\ndegrees = 30\r\nterms = 10\r\nprint(round(sumsine(degrees, terms), 2))\r\n<\/pre>\nOutput:<\/strong><\/p>\nThe sum of sine series of 30 degrees of 10 terms = 0.5<\/pre>\nExplanation:<\/strong><\/p>\n\nThe user must provide the value of x in degrees and the number of terms, which will be saved in separate variables.<\/li>\n These values are supplied as arguments to the sine functions.<\/li>\n A sine function is built, and a for loop is used to convert degrees to radians and calculate the values of each term using the sine expansion formula.<\/li>\n The sum variable is added to each term.<\/li>\n This process is repeated until the number of phrases equals the number specified by the user.<\/li>\n The total sum of sine series is printed<\/li>\n<\/ul>\nApproach:<\/strong><\/p>\n\nScan\u00a0 the degree value of x and the number of terms using int(input())\u00a0 and store them in separate variables.<\/li>\n As parameters, pass these values to the sine function.<\/li>\n Create a sine function and then, using a for loop, convert degrees to radians.<\/li>\n Then apply the sine formula expansion to each term and add them to the sum variable.<\/li>\n Then print the expansion’s total sum.<\/li>\n Exit of program.<\/li>\n<\/ul>\nBelow is the implementation:<\/strong><\/p>\n# importing math module\r\nimport math\r\n# function which returns sum of sine series\r\n\r\n\r\ndef sumsine(degrees, terms):\r\n # taking a variable which stores sum of sine series\r\n sumSeries = 0\r\n for i in range(terms):\r\n # getting sign\r\n signofNum = (-1)**i\r\n # pie value\r\n pievalue = 22\/7\r\n # degree value of given number\r\n degval = degrees*(pievalue\/180)\r\n sumSeries = sumSeries + ((degval**(2.0*i+1)) \/\r\n math.factorial(2*i+1))*signofNum\r\n # returning the sum of sine series\r\n return sumSeries\r\n\r\n\r\ndegrees = int(input(\"enter the number of degrees = \"))\r\nterms = int(input(\"enter number of terms = \"))\r\nprint(\"The sum of sine series of \", degrees, \"degrees\", \"of\",\r\n terms, \"terms =\", round(sumsine(degrees, terms), 2))\r\n<\/pre>\nOutput:<\/strong><\/p>\nenter the number of degrees = 55\r\nenter number of terms = 15\r\nThe sum of sine series of 55 degrees of 15 terms = 0.82<\/pre>\n","protected":false},"excerpt":{"rendered":"If you are new to Java and want to learn the java coding skills too fast. Try practicing the core java programs with the help of the Java basic programs list available. Consider the case where we have a value x and we need to determine the sum of the sine(x) series. There are numerous …<\/p>\n
Python Program to Find the Sum of Sine Series<\/span> Read More »<\/a><\/p>\n","protected":false},"author":7,"featured_media":8692,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[5],"tags":[],"yoast_head":"\nPython Program to Find the Sum of Sine Series - Python Programs<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n\t \n\t \n\t \n