Python | math.ceil() function Last Updated : 16 Feb, 2023 Comments Improve Suggest changes Like Article Like Report In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.ceil() function returns the smallest integral value greater than the number. If number is already integer, same number is returned. Syntax: math.ceil(x) Parameter: x: This is a numeric expression. Returns: Smallest integer not less than x. Time Complexity: O(1) Auxiliary Space: O(1) Code #1: Python3 # Python code to demonstrate the working of ceil() # importing "math" for mathematical operations import math x = 33.7 # returning the ceil of 33.7 print ("The ceil of 33.7 is : ", end ="") print (math.ceil(x)) Output:The ceil of 33.7 is : 34 Code #2: Python3 # Python code to demonstrate the working of ceil() # importing "math" for mathematical operations import math # prints the ceil using ceil() method print ("math.ceil(-13.1) : ", math.ceil(-13.1)) print ("math.ceil(101.96) : ", math.ceil(101.96)) Output:math.ceil(-13.1) : -13 math.ceil(101.96) : 102 Comment More infoAdvertise with us Next Article Python | math.ceil() function S Shivam_k Follow Improve Article Tags : Python Python math-library-functions Practice Tags : python Similar Reads Python | math.factorial() function In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.factorial() function returns the factorial of desired number. Syntax: math.factorial(x) Parameter: x: This is a numeric expression. Returns: factorial of desired number. Time 2 min read Python | math.floor() function In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.floor() function returns the largest integer not greater than x. If number is already integer, same number is returned. Syntax: math.floor(x) Parameter: x: This is a numeric e 1 min read Python | math.gcd() function In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.gcd() function compute the greatest common divisor of 2 numbers mentioned in its arguments. Syntax: math.gcd(x, y) Parameter: x : Non-negative integer whose gcd has to be comp 2 min read cmp() function - Python cmp() method in Python 2.x compares two integers and returns -1, 0, 1 according to comparison. cmp() does not work in python 3.x. You might want to see list comparison in Python.ExamplePython# Example 1 print(cmp(3, 4)) # Example 2 print(cmp(5, 5)) # Example 3 print(cmp(7, 6)) Output-101ExplanationI 3 min read modf() function - Python modf() function is an inbuilt function in Python that returns the fractional and integer parts of the number in a two-item tuple. Both parts have the same sign as the number. The integer part is returned as a float. Example:Pythonimport math # modf() function used with a positive number print("math. 3 min read math.cos() in Python math.cos() function in Python is part of the built-in math module, which provides access to mathematical functions. The math.cos() function is used to calculate the cosine of an angle, which is a fundamental trigonometric function widely used in various fields like physics, engineering and computer 2 min read Python | frexp() Function frexp() function is one of the Standard math Library function in Python. It returns mantissa and exponent as a pair (m, e) of a given value x, where mantissa m is a floating point number and e exponent is an integer value. m is a float and e is an integer such that x == m * 2**e exactly. If x is zer 2 min read floor() and ceil() function Python Python provides a built-in math module that includes many useful mathematical functions and constants. It is commonly used for operations such as rounding numbers, working with trigonometric functions, performing logarithmic calculations, and more."Among these are two commonly used functions:floor() 4 min read pandas.eval() function in Python This method is used to evaluate a Python expression as a string using various back ends. It returns ndarray, numeric scalar, DataFrame, Series. Syntax : pandas.eval(expr, parser='pandas', engine=None, truediv=True, local_dict=None, global_dict=None, resolvers=(), level=0, target=None, inplace=False) 2 min read Python Functions Python Functions is a block of statements that return the specific task. The idea is to put some commonly or repeatedly done tasks together and make a function so that instead of writing the same code again and again for different inputs, we can do the function calls to reuse code contained in it ov 11 min read Like