Answer to Question #302065 in Python for vaishu

Question #302065

how to get right angle triangle when input is 5

1
Expert's answer
2022-02-24T04:19:46-0500
#how to get right angle triangle when input is 5

a = int(input("Enter a side: "))

if(a%2==0):
    c = ((a*a)/4)+1
    b = ((a*a)/4)-1

if(a%2==1):
    c = (a*a+1)/2
    b = (a*a-1)/2

print("Sides of right angle triangle: ",a,",",b,",",c)  

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS