Programming Examples

Python program to accept the Base and Perpendicular and find the Hypotenuse


Write  a python program to accept the Base and Perpendicular for right angled triangle from user and find the Hypotenuse

Hint: h2=b2+p2

import math
base=float(input("Enter the length of base "))
per=float(input("Enter the length of Perpendicular "))
hyp=math.sqrt(base*base+per*per)
print("Length of Hypotenuse is : ",hyp)
Output

Enter the length of base 4

Enter the length of Perpendicular 3

Length of Hypotenuse is :  5.0

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