Python – Sympy Triangle.is_isosceles() method
Last Updated :
26 May, 2020
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:
from sympy.geometry import Triangle, Point
t1 = Triangle(Point( 0 , 0 ), Point( 6 , 0 ), Point( 3 , 4 ))
isIsosceles = t1.is_isosceles()
print (isIsosceles)
|
Output:
True
Example #2:
from sympy.geometry import Triangle, Point
t2 = Triangle(Point( 0 , 0 ), Point( 3 , 0 ), Point( 3 , 4 ))
isIsosceles = t2.is_isosceles()
print (isIsosceles)
|
Output:
False
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...