コード例 #1
0
ファイル: test_maths.py プロジェクト: Danawill/algorithms
 def test_pythagoras(self):
     self.assertEqual("Hypotenuse = 3.605551275463989", pythagoras(3, 2, "?"))
コード例 #2
0
 def test_pythagoras(self):
     self.assertEqual("Hypotenuse = 3.605551275463989",
                      pythagoras(3, 2, "?"))
コード例 #3
0
"""
input two of the three side in right angled triangle and return the third. use "?" to indicate the unknown side.
"""
from algorithms.maths import pythagoras

# opposite,adjacent,hypotenuse

print(pythagoras(10, 4, "?"))