Skip to content

Write a Python program to input all sides of a triangle and check whether triangle is valid or not.

PYTHON

Write a Python program to input all sides of a triangle and check whether triangle is valid or not.

a = int(input('Please Enter the First Angle of a Triangle: ')) b = int(input('Please Enter the Second Angle of a Triangle: ')) c = int(input('Please Enter the Third Angle of a Triangle: ')) total = a + b + c if total == 180: print("\nThis is a Valid Triangle") else: print("\nThis is an Invalid Triangle")

OUTPUT…..