Wednesday, August 27, 2025
HomeLanguagesPython – Sympy Triangle.is_scalene() method

Python – Sympy Triangle.is_scalene() method

In Sympy, the function Triangle.is_scalene() is used to check whether the given triangle is Scalene Triangle or not. Scalene Triangle is the triangle in which all the sides are of different lengths.

Syntax: Triangle.is_scalene()

Returns: 
 True: if it is scalene, otherwise False

Example #1:




# import Triangle, Point
from sympy.geometry import Triangle, Point
   
# using Triangle()
t1 = Triangle(Point(0, 0), Point(3, 0), Point(1, 2))
   
# using is_scalene()
isScalene = t1.is_scalene()
print(isScalene)


Output:

True

 

Example #2:




# import Triangle, Point
from sympy.geometry import Triangle, Point
   
# using Triangle()
t2 = Triangle(Point(0, 0), Point(4, 0), Point(2, 4))
   
# using is_scalene()
isScalene = t2.is_scalene()
print(isScalene)


Output:

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

Most Popular

Dominic
32236 POSTS0 COMMENTS
Milvus
80 POSTS0 COMMENTS
Nango Kala
6609 POSTS0 COMMENTS
Nicole Veronica
11779 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11828 POSTS0 COMMENTS
Shaida Kate Naidoo
6719 POSTS0 COMMENTS
Ted Musemwa
7002 POSTS0 COMMENTS
Thapelo Manthata
6678 POSTS0 COMMENTS
Umr Jansen
6690 POSTS0 COMMENTS