GRAND ASSIGNMENT - 1Traingles

 Traingles

Given three sides of the triangle(a, b, c) as input. Write a program to determine whether the triangle is Equilateral, Isosceles or Scalene.
Input

The first line of input will contain an integer A.
The second line of input will contain an integer B.
The third line of input will contain an integer C.
Output

If the given sides A, B and C are equal, print "Equilateral".
In the given sides any of two sides are equal print "Isosceles".
If the given sides A, B, C are not equal to each other, print "Scalene".
Explanation

For example, if the given sides are 4, 4, 4 the output should be "Equilateral".
Similarly, if the given sides are 3, 2, 3 the output should be "Isosceles".
Sample Input 1
4
4
4
Sample Output 1
Equilateral
Sample Input 2
3
2
3
Sample Output 2
Isosceles










A = int(input())
B = int(input ())
C = int(input ())

if A == B  and B==C and C==A :
    print ("Equilateral")
elif A==B or B==C or C==A : 
    print ("Isosceles") 
else :
    print ("Scalene")


Comments

Popular posts from this blog

CODING ASSIGNMENT 3 Library Management

CODING PRACTICE 11 Music Page

CCBP Static Website Coding Assignment 2 Solution | Yoga Page