Python Online Compiler
Example: Python program to find all angles of a triangle if two angles are given
C
C++
C#
Java
Python
PHP
main.py
STDIN
Run
# Python program to find all angles of a triangle if two angles are given print("Enter the two angles of the triangle::") p, q, r = int(input()), int(input()), None # p, q, and r is all angles of the triangle # Compute third angle r = 180 - (p + q) # Output print("Third angle of the triangle = ", r)
50 70
Output
Clear
ADVERTISEMENTS