0
Help me fix the python code below
def hypotenuse(leg1, leg2): #our function takes two arguments the leg 1 and leg 2 return( leg1**2 +leg 2**2)**(1/2) #according to the pythagorus theorem hypotenuse is equal to the square root of the sum of the squared legs print ("Test number 1, triangle with legs 3 and 4, hypotenuse is:," hypotenuse(3,4) ) #prints the call for triangle with legs 3 and 4 print ("Test number 2, triangle with legs 8 and 9, hypotenuse is:," + hypotenuse(8,9) ) #prints the call for triangle with legs 8 and 9 print ("Test number 3, triangle with legs 12 and 15, hypotenuse is:," + hypotenuse(12,15) )
2 Antworten