The sin() function - python math module

The sin() function in the math module of python, provides sine value for an angular value in radians, which is the ratio between the opposite side and hypotenuse.

Math Updated 26 Sep 2016 1 min read

Function signature

sin(angleValue_Radians)

Parameters

aRadians_in : Radians for which the sin θ value needs to be found

Method overview

In Python, the math.sin() function returns the sine value for the given angle in radians. The sine value of an angle is given by the ratio of opposite to the hypotenuse.

Return value

The sine value for the given angle in radians.

Example

python
# Find sin θ value for common angles

import math

# sin θ value for zero degrees

Radians0    = math.radians(0)

sin0        = math.sin(Radians0)

sin0Rounded = round(sin0,2)

# sin 30 value for zero degrees

Radians30           = math.radians(30)

sin30               = math.sin(Radians30)

sin30Rounded        = round(sin30,2)

# sin 45 value for zero degrees

Radians45       = math.radians(45)

sin45           = math.sin(Radians45)

sin45Rounded    = round(sin45,2)

# sin 60 value for zero degrees

Radians60           = math.radians(60)

sin60               = math.sin(Radians60)

sin60Rounded        = round(sin60,2)

# sin 90 value for zero degrees

Radians90       = math.radians(90)

sin90           = math.sin(Radians90)

sin90Rounded    = round(sin90,2)

# Sin(degrees) : Python Example: Printing values for common angles

print("Sin0:{}".format(sin0Rounded))

print("Sin30:{}".format(sin30Rounded))

print("Sin45:{}".format(sin45Rounded))

print("Sin60:{}".format(sin60Rounded))

print("Sin90:{}".format(sin90Rounded))

Output

Output
Sin0:0.0

Sin30:0.5

Sin45:0.71

Sin60:0.87

Sin90:1.0