Write a Python Program to find Angle of a Triangle if two angles are given with practical example.

**TIP :** Sum of all angles in a triangle = 180

## Python Program to find Angle of a Triangle if two angles are given Example 1

This python program helps user to enter two angles of a triangle. Next, we subtracted those two angles from 180.

# Python Program to find Angle of a Triangle if two angles are given a = float(input('Please Enter the First Angle of a Triangle: ')) b = float(input('Please Enter the Second Angle of a Triangle: ')) # Finding the Third Angle c = 180 - (a + b) print("Third Angle of a Triangle = ", c)

**OUTPUT**

## Python Program to find Angle of Triangle if two angles are given Example 2

This program to find Angle of a Triangle is same as above. However, we separated the logic using functions concept.

# Python Program to find Angle of a Triangle if two angles are given def triangle_angle(a, b): return 180 - (a + b) a = float(input('Please Enter the First Angle of a Triangle: ')) b = float(input('Please Enter the Second Angle of a Triangle: ')) # Finding the Third Angle c = triangle_angle(a, b) print("Third Angle of a Triangle = ", c)

**OUTPUT**