Program to check whether a triangle is a scalene

In this python if else program, we will check whether a triangle is scalene or not depending on the side lengths.

A scalene triangle is a triangle in which all three sides are in different lengths, and all three angles are of different measures. However, the sum of all the interior angles is always equal to 180 degrees.

Steps to solve the program
  1. Take 3 sides of the triangle as input through the user.
  2. If all three sides of the triangle are not equal then the triangle is a scalene triangle.
  3. Use an if-else statement to check this.
  4. Print the output.
				
					s1 = int(input("Enter length of side 1: "))
s2 = int(input("Enter length of side 2: "))
s3 = int(input("Enter length of side 3: "))

if s1 != s2 != s3:
    print("It is a scalane triangle")
else:
    print("It is not a scalane triangle")
				
			

Output :

				
					Enter length of side 1: 10
Enter length of side 2: 15
Enter length of side 3: 18
It is an scalane triangle
				
			

Related Articles

check whether a triangle is equilateral or not.

check whether a triangle is isosceles or not.

Leave a Comment