Python | sympy.Rational() method Last Updated : 02 Aug, 2019 Comments Improve Suggest changes Like Article Like Report With the help of sympy.Rational() method, we can find the rational form of any float value that is passed as parameter in sympy.Rational() method. Syntax : sympy.Rational(val) Return : Return Rational form of float value. Example #1 : In this example we can see that by using sympy.Rational() method, we are able to find the rational form of any float value that is passed as parameters. Python3 1=1 # import sympy from sympy import * # Using sympy.Rational() method gfg = Rational(0.2) print(gfg) Output : 1/5 Example #2 : Python3 1=1 # import sympy from sympy import * # Using sympy.Rational() method gfg = Rational(0.12) print(gfg) Output : 12/100 Comment More infoAdvertise with us Next Article Python | sympy.Rational() method J jitender_1998 Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.is_rational method With the help of sympy.is_rational method, we can check whether the element is rational or not this method will return the boolean value i.e True or False. Syntax : sympy.is_rational Return : Return True if rational else False. Example #1: In this example, we can see that by using sympy.is_rational 1 min read Python | sympy.sqrt() method With the help of sympy.sqrt() method, we can find the square root of any value in terms of values and also in terms of symbolically simplified mathematical expression. Syntax: sqrt(val) Parameters: val â It is the value on which square root operation is to be performed. Returns: Returns square root 1 min read Python | sympy.sqrt() method With the help of sympy.sqrt() method, we can find the square root of any number by using sympy.sqrt() method. Syntax : sympy.sqrt(number) Return : Return square root of any number. Example #1 : In this example we can see that by using sympy.sqrt() method, we can get the square root of any number. Py 1 min read Python | sympy.is_real method With the help of sympy.is_real method, we can check whether element is real or not this method will return the boolean value i.e True or False. Syntax : sympy.is_real Return : Return True if real else False. Example #1 : In this example we can see that by using sympy.is_real method, we are able to c 1 min read Python | sympy.subfactorial() method With the help of sympy.subfactorial() method, we can find the Subfactorial of a number in SymPy. Subfactorial of a number is given by - !n = \begin{cases} 1 & n = 0 \\ 0 & n = 1 \\ (n-1)(!(n-1) + !(n-2)) & n > 1 \end{cases} Syntax: subfactorial(n) Parameter: n - It denotes the number 1 min read Like