Recent Posts

Math Functions & Math Modules

Math Functions





We will start with basic math functions

Round function



Absolute function: Always reply with a positive value


Math module: separate files with some reusable codes

We use it to organize  our code into different files
math ceiling:



math floor


Different math modules:

math.ceil(x)
Return the ceiling of x, the smallest integer greater than or equal to x. If x is not a float, delegates to x.__ceil__(), which should return an Integral value.
math.copysign(xy)
Return a float with the magnitude (absolute value) of x but the sign of y. On platforms that support signed zeros, copysign(1.0, -0.0) returns -1.0.
math.fabs(x)
Return the absolute value of x.
math.factorial(x)
Return x factorial. Raises ValueError if x is not integral or is negative.
math.floor(x)
Return the floor of x, the largest integer less than or equal to x. If x is not a float, delegates to x.__floor__(), which should return an Integral value.





Math Functions & Math Modules Math Functions & Math Modules Reviewed by ohhhvictor on May 04, 2019 Rating: 5

No comments:

Facebook

 photo imagen120.jpg
Theme images by 5ugarless. Powered by Blogger.