Python program that reads three nonzero integer values and determines and prints whether they could represent the sides of a triangle.

Here is code for a python program that reads three nonzero integer values and determines and prints whether they could represent the sides of a triangle.


# Python program that reads in an integer and determines whether or not it’s a palindrome

a = int(input("Enter first side: "))
b = int(input("Enter second side: "))
c = int(input("Enter third side: "))

if a + b > c and b + c > a and c + a > b:
    print("The given sides are of a triangle.")
else:
    print("The given sides are not of a triangle.")
    
# This code is contributed by Ahmad Shafiq

callout-flag

Love this read? Subscribe to Modernage!

Do you have any queries? You can ask in the comments. We, at Modernage answer each and every question, asked in the comments, so If you have any queries, or you want to know about any specific platform you can ask in the comments below

Author

Leave a Reply

girl-carrying-document

More Articles.

girl-carrying-document

More Articles.