示例#1
0
def main():
    print(hypotenuse(3, 4))
    print(area(5, 10))
示例#2
0
def test_hypotenuse2():
    assert hypotenuse(6, 8) == 10
示例#3
0
def test_hypotenuse1():
    assert hypotenuse(3, 4) == 5
示例#4
0
def test_hypotenuse5():
    x = 23
    h = hypotenuse(x, x)
    assert abs(h - x * math.sqrt(2)) < 0.001
示例#5
0
def test_hypotenuse4():
    x = 23
    y = 15
    h = hypotenuse(x, y)
    assert h < x + y
示例#6
0
def test_hypotenuse3():
    x = 23
    y = 15
    h = hypotenuse(x, y)
    assert h > x and h > y
    assert h < x + y