Wednesday, October 1, 2025
HomeLanguagesPython – Sympy Triangle.is_right() method

Python – Sympy Triangle.is_right() method

In Sympy, the function Triangle.is_right() is used to check whether the given triangle is Right-Angled Triangle or not. Right-Angled Triangle is the triangle in which one angle is a right angle(90 degrees).

Syntax: Triangle.is_right()

Returns: 
 True: if it is right-angled, otherwise False

Example #1:




# import Triangle, Point
from sympy.geometry import Triangle, Point
    
# using Triangle()
t1 = Triangle(Point(0, 0), Point(4, 0), Point(4, 3))
    
# using is_right()
isRight = t1.is_right()
print(isRight)


Output:

True

 
Example #2:




# import Triangle, Point
from sympy.geometry import Triangle, Point
    
# using Triangle()
t2 = Triangle(Point(0, 0), Point(2, 0), Point(4, 3))
    
# using is_right()
isRight = t2.is_right()
print(isRight)


Output:

False
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32330 POSTS0 COMMENTS
Milvus
84 POSTS0 COMMENTS
Nango Kala
6703 POSTS0 COMMENTS
Nicole Veronica
11867 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11926 POSTS0 COMMENTS
Shaida Kate Naidoo
6815 POSTS0 COMMENTS
Ted Musemwa
7078 POSTS0 COMMENTS
Thapelo Manthata
6775 POSTS0 COMMENTS
Umr Jansen
6774 POSTS0 COMMENTS