Python – Sympy Triangle.is_isosceles() method

In Sympy, the function Triangle.is_isosceles() is used to check whether the given triangle is Isosceles triangle or not. Isosceles Triangle is the triangle in which two or more of the sides are of the same length.

Syntax: Triangle.is_isosceles()

Returns: 
 True: if it is isosceles, otherwise False

Example #1:

filter_none

edit
close

play_arrow

link
brightness_4
code

# import Triangle, Point
from sympy.geometry import Triangle, Point
  
# using Triangle()
t1 = Triangle(Point(0, 0), Point(6, 0), Point(3, 4))
  
# using is_isosceles()
isIsosceles = t1.is_isosceles()
print(isIsosceles)

chevron_right


Output:

True

 

Example #2:

filter_none

edit
close

play_arrow

link
brightness_4
code

# import Triangle, Point
from sympy.geometry import Triangle, Point
  
# using Triangle()
t2 = Triangle(Point(0, 0), Point(3, 0), Point(3, 4))
  
# using is_isosceles()
isIsosceles = t2.is_isosceles()
print(isIsosceles)

chevron_right


Output:

False
My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.