Python – Find Sine – sin() Function with Examples

sin() function is used to find the sine of given argument in radians. Where sine is a trigonometric function which represents the ratio between hypotenuse and opposite. sine() function is a part of python programming language.

Syntax of sin() Function

The syntax of sin() function in Python is:

math.sin(x)

Parameters of sin() Function in Python

x – Where x is any valid python number (positive or negative). This parameter is required.
Note: If the x parameter is not a number, sin() function will return an Error.

Compatibility

sin() function is available and compatible with both Python 2.x and 3.x. This function is a part of the python standard math library.

Return Value of sin() Function in Python

sin() function returns the sine of a given input (x – parameter) in radians.

Python sin() Function Example

# import math library
import math
print(math.sin(-0.))
print(math.sin(0))
print(math.sin(0.88))
print(math.sin(69))
print(math.sin(-4539))

Output:
-0.0
0.0
0.7707388788989693
-0.11478481378318722
-0.5657845572845066