Write a Python program to enter two angles of a triangle and find the third angle.

SOLUTION....

# Program to find third angle of a triangle

# Input
angle1 = float(input("Enter first angle of triangle: "))
angle2 = float(input("Enter second angle of triangle: "))

# Formula: Sum of angles of a triangle = 180
angle3 = 180 - (angle1 + angle2)

# Output
print("The third angle of the triangle =",angle3)

OUTPUT

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.