{"id":24313,"date":"2021-10-14T09:18:29","date_gmt":"2021-10-14T03:48:29","guid":{"rendered":"https:\/\/python-programs.com\/?p=24313"},"modified":"2021-11-05T21:06:16","modified_gmt":"2021-11-05T15:36:16","slug":"python-program-for-sin-function","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-sin-function\/","title":{"rendered":"Python Program for sin() Function"},"content":{"rendered":"

In the previous article, we have discussed Python Program for cos() Function<\/a>
\nsin() Function in Python:<\/strong><\/p>\n

The sine of a number is returned by the math.sin() method.<\/p>\n

The Sine function’s mathematical formula is:<\/p>\n

sin(A) = length of opposite side\/length of hypotenuse<\/p>\n

Syntax:<\/strong><\/p>\n

math.sin(x)<\/pre>\n

Parameters:<\/strong><\/p>\n

x:<\/strong> This is Required. It is the number to calculate the sine of. If the value is not a number, a TypeError is returned.<\/p>\n

Return value:<\/strong><\/p>\n

Returns a float value ranging from -1 to 1 that represents the sine of an angle.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given first number (angle) = 15  \r\nGiven second number (angle) = 1<\/pre>\n

Output:<\/strong><\/p>\n

The result after applying sin() function on above given first number 15  =  0.6502878401571168\r\nThe result after applying sin() function on above given second number 1  =  0.8414709848078965<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given first number (angle) = 10\r\nGiven second number (angle) = 4<\/pre>\n

Output:<\/strong><\/p>\n

The result after applying sin() function on above given first number 10  =  -0.5440211108893698\r\nThe result after applying sin() function on above given second number 4  =  -0.7568024953079282<\/pre>\n

Program for sin() Function in Python<\/h2>\n