Answer to Question #281483 in Python for adarsh

Question #281483

Given three sides of a 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 & C are equal,print Equilateral

If 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

Sample Input 1

4

4

4

Sample Output 1

Equilateral


Sample Input 2

3

2

3

Sample Output 2

Isosceles


1
Expert's answer
2021-12-20T09:57:29-0500
A = int(input('Enter A: '))
B = int(input('Enter B: '))
C = int(input('Enter C: '))


if A == B and B == C:
    print('Equilateral')
elif A != B and A != C and B != C:
    print('Scalene')
else:
    print('Isosceles')

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