import numpy as np lilleK = float(input('Lengden av lille katet = ')) hypo = float(input('Lengden av hypotenusen = ')) storeK = np.sqrt(hypo**2 - lilleK**2) v1 = np.arctan(lilleK/storeK) v2 = np.arctan(storeK/lilleK) v3 = np.pi/2 print('Kontroll: Sum av vinkler skal være 180:', np.degrees(v1 + v2 + v3)) print('Vinklene i rad er:', f'{v1:.4f},', f'{v2:.4f},', f'{v3:.4f}') print('Vinklene er grader er:', f'{np.degrees(v1):.1f},', f'{np.degrees(v2):.1f},', f'{np.degrees(v3):.1f}')