Sin Function - Python Math Module

Method name:

sin(aRadians_in)

Method overview:

The python, math.sin() function returns the ratio of opposite side to the hypotenuse, for the given radian value.

Parameters:

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

Return value:

The sin θ value for the given radians value is returned.

Example:

# 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:

Sin0:0.0

Sin30:0.5

Sin45:0.71

Sin60:0.87

Sin90:1.0


Copyright 2023 © pythontic.com