Python | sympy.is_rational method Last Updated : 12 Sep, 2023 Comments Improve Suggest changes Like Article Like Report 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 method, we are able to check the rational value and it will return a boolean value. Python3 # import sympy from sympy import * # Use sympy.is_rational method gfg = simplify(2 / 5).is_rational print(gfg) Output : True Example #2 : Python3 # import sympy from sympy import * # Use sympy.is_rational method gfg = simplify(5).is_rational print(gfg) Output : True Example #3 : Python3 # import sympy from sympy import * # Use sympy.is_rational method gfg = simplify(sqrt(3)).is_rational print(gfg) Output : False Comment More infoAdvertise with us Next Article Python | sympy.is_rational method J jitender_1998 Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.Rational() method 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, 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.has() method With the help of sympy.has() method, we can check if variable is used in that mathematical expression or not and this will return a boolean values by using sympy.has() method. Syntax : sympy.has(variable) Return : Return boolean value i.e True or False. Example #1 : In this example we can see that b 1 min read Python | sympy.is_even() method In the sympy module, we can test whether a given number n is even or not using sympy.is_even() function. Syntax: sympy.is_even(n) Parameter: n; number to be tested Return: bool value result Code #1: Python3 # Python program to check even number # using sympy.is_even() method # importing sympy module 1 min read Python | Sympy Ellipse() method In sympy, the function Ellipse() is used to create ellipse from a center and two radii, the first being the horizontal radius (along the x-axis) and the second being the vertical radius (along the y-axis). Syntax: Ellipse() Parameters: center: Point hradius: number or SymPy expression, optional vrad 1 min read Like