math.sin()

Anonymous contributor's avatar
Anonymous contributor
Anonymous contributor's avatar
Anonymous contributor
Published Jun 22, 2021Updated Aug 6, 2023
Contribute to Docs

Returns the sine of input numeric x, measured in radian value.

Syntax

math.sin(x)

Example 1

Use math.sin() to return the sine of the integer 5 measured in radian value:

import math
print(math.sin(5))
# Output: -0.9589242746631385

Example 2

Use math.sin() to return the sine of the float 5.5 measured in radian value:

import math
print(math.sin(5.5))
# Output: -0.7055403255703919

Codebyte Example

The following code is runnable and returns the sine of different values:

Code
Output
Loading...

All contributors

Looking to contribute?

Learn Python on Codecademy