math.sin()
Published Jun 22, 2021Updated Mar 17, 2024
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 mathprint(math.sin(5))
The above code gives the following output:
-0.9589242746631385
Example 2
Use math.sin()
to return the sine of the float 5.5
measured in radian value:
import mathprint(math.sin(5.5))
The above code gives the following output:
-0.7055403255703919
Codebyte Example
Run the following example that uses the math.sin()
function to understand its working:
All contributors
- ishg-153
- Anonymous contributor
- christian.dinh
- Anonymous contributor
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Python on Codecademy
- Career path
Computer Science
Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!Includes 6 CoursesWith Professional CertificationBeginner Friendly75 hours - Course
Learn Python 3
Learn the basics of Python 3.12, one of the most powerful, versatile, and in-demand programming languages today.With CertificateBeginner Friendly23 hours