Lecture Note
University
American Baptist CollegeCourse
CSCI 1534 | Data Analysis and VisualizationPages
1
Academic year
2023
Muthia Marhamah
Views
0
p {margin: 0; padding: 0;} .ft00{font-size:18px;font-family:NimbusRomanRegular;color:#000000;} .ft01{font-size:18px;font-family:NimbusRomanBold;color:#000000;} Operation Using Modules and Tools Math Module This module parents commonly required mathematical functions as well as a huge number of other mathematical functions. The function (sin, cos, tan, etc) need angle in radians as argument. The math module presents two angle conversion functions (degrees () and radians ()) to convert angle in degrees to radians and vice versa. Math modules example in python as follows. 1. Math.acos() to returns the arc cosine of a number. 2. Math.acosh() to return the inverse hyperbolic cosine of a number. 3. Math.asin() to returns the arc sine of a number. 4. Math.asinh() to return the inverse hyperbolic sine of a number. 5. Math.atan() to returns the arc tangent of a number in radians. 6. Math.atan() to returns the arc tangent of y/x in radians. 7. Math.atanh() to return the inverse hyperbolic tangent of a number. SYS and IO Module This module provides function and variables used to manipulate different parts of the python runtime environment. The example of sys module: 1. Sys.argv This return list of command line arguments passed to a python. 2. Sys.exit This cause program to end and return to either python console or command prompt.
Return Function Value and Define Function
Please or to post comments