Answer to Question #234371 in Python for umesh

Question #234371

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".



1
Expert's answer
2021-09-07T14:16:20-0400
a, b, c = int(input()), int(input()), int(input())
if a == b and b == c:
    print('Equilateral')
elif a == b or b == c or c == a:
    print('Isosceles')
else:
    print('Scalene')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS