Programming Examples

Python program to find a side of a right angled triangle whose two sides and an angle is given


Write a program to find a side of a right angled triangle whose two sides and an angle is given.

Solution

import math

a = float(input("Enter base: "))
b = float(input("Enter height: "))
x = float(input("Enter angle: "))

c = math.sqrt(a ** 2 + b ** 2)

print("Hypotenuse =", c)Enter base: 10.5
Enter height: 5.5
Enter angle: 60
Hypotenuse = 11.853269591129697
Output

Enter base: 10.5

Enter height: 5.5

Enter angle: 60

Hypotenuse = 11.853269591129697

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz