Python Help. Code is going past if/Else Statement
Question: The assignment is to write a code that can do triangles (find the perimeter,
area, if it is an equilateral, right, etc.)

I believe my code is on target, but it doesn't render an error like it should
when the numbers don't form a triangle. Any help would be greatly appreciated.

    
    
    import math
    
    A = int (input ("Type in your first integer that you would like to test:"))
    print ("Your first integer to be tested is:", A)
    
    B = int (input ("Type in your second integer that you would like to test:"))
    print ("Your second integer to be tested is:", B)
    
    C = int (input ("Type in your third integer that you would like to test:"))
    print ("Your third integer to be tested is:", C)
    
    if (A > B):
        largest = A
    else:
        largest = B
    
    if (C > largest):
        largest = C
    
    print ("The largest number is:", largest)
    
    if A<=0 or B<=0 or C<=0:
        print("The numbers don't form a triangle")
    else:
        print("The Triangle's Perimeter is:")
        print(int(A+B+C))
        print("The semiperimeter is:")
        print(int((A+B+C)/2))
        print("The Area of the triangle is:")
        print (int (math.sqrt((A+B+C)/2)*(((A+B+C)/2)-A)*(((A+B+C)/2)-B)*(((A+B+C)/2)-C)))
    
    if  int(A != B and A != C and B != C):
        print("The triangle is a scalene")
    else:
        print ("The triangle is not a scalene")
    
    if int(A == B and B == A or A == C and C == A or C == B and B == C):
        print ("The triangle is an isosceles")
    else:
        print ("The triangle is not an isosceles")
    
    if int(A == B == C):
        print("The triangle is an equilateral")
    else:
        print("The triangle is not an equilateral")
    
    if int(C*C == A*A + B*B):
        print("The triangle is a right triangle")
    else:
        print("The triangle is not a right triangle")
    


Answer: Try this code:

    
    
    import math
    def chkRectr(x1,x2,x3):
        if (x1**2==x2**2+x3**2)or(x2**2==x1**2+x3**2)or(x3**2==x2**2+x1**2):
            return True
        else:
            return False
    def fHigh(aa,bb,cc):
        d=math.sqrt(3)/2
        if (aa==bb):
            return math.sqrt(aa**2-(cc/2)**2)
        elif (aa==cc):
            return math.sqrt(aa**2-(bb/2)**2)
        elif (bb==cc):
            return math.sqrt(bb**2-(aa/2)**2)
    
    def trikind():
        if (a==b)or(b==c)or(a==c):
            if a==b==c:
                print("And it's kind: Equilateral triangle")
            else:
                if chkRectr(a,b,c)==True:
                    print("And it's kind: Isosceles rectanglar triangle")
                else:
                    print("And it's kind: Isosceles triangle")
                print("And its height is "+str(fHigh(a,b,c)))
    
        elif chkRectr(a,b,c)==True:
            print("And it's kind: Rectanglar triangle")
    
    print("In this program I will tell you about existence of a triangle and kind of it.")
    
    a,b,c=[float(x) for x in input("Enter three sides lenth(Split with ','): ").split(",")]
    
    
    if a+b>c:
        if b+c>a:
            if c+a>b:
                print("\nIt's a triangle!\n")
                trikind()
    
    else:
        print("\nSorry but It's not a triangle!!!! :((")
    

It's different from what you mean but if you notice it's good at understanding
a triangle!!!

