Getting started with Python provides a full solution to trigonometric functions [add to favorites]. Getting started with trigonometric functions in python

Source: Internet
Author: User

Getting started with Python provides a full solution to trigonometric functions [add to favorites]. Getting started with trigonometric functions in python

The trigonometric function in Python is located in the math module.

Introduction module:

import math

Output pi:

import math
print(math.pi)

December 3.141592653589793

Math contains functions such as sin, cos, and tan, which are used in the same way as C.

The following describes the trigonometric functions in Python:

Function Description
Acos (x) Returns the arc cosine radians of x.
Asin (x) Returns the arc sine radians of x.
Atan (x) Returns the arc tangent radians of x.
Atan2 (y, x) Returns the arc tangent of the given X and Y coordinate values.
Cos (x) Returns the cosine of the radians of x.
Hypot (x, y) Returns the euclidean norm sqrt (x * x + y * y ).
Sin (x) Returns the sine of x radians.
Tan (x) Returns the tangent of x radians.
Degrees (x) Converts radians to degrees. For example, if degrees (math. pi/2), 90.0 is returned.
Radians (x) Converts degrees to radians.

Summary

The above is all about the trigonometric function full solution for getting started with Python. I hope it will be helpful to you. If you are interested, you can continue to refer to this site: to learn more about the value transfer or reference transfer of function passing parameters in python, to learn more about several functions in Python, and to learn about raw_input () of Python built-in functions () if you have any questions with the input () code parsing, you can leave a message at any time. The editor will reply to you in a timely manner. Thank you for your support!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.