예제 #1
0
def main():
    m1 = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
    m2 = [[6, 5, 0], [1, 3, 9], [0, 2, 1]]
    print(matrices.add_matrices(m1, m2))
    print(matrices.sub_matrices(m1, m2))
    print(figures.square_area(2))
    print(figures.triangle_area(6, 3))
예제 #2
0
def test_square_area():
    assert square_area(5) == 25
    assert triangle_area(2, 4) == 4
def test_triangle_area():
    assert triangle_area(2, 2) == 2
예제 #4
0
def test_pole_trojkat():
    assert figures.triangle_area(2, 1) == 1
예제 #5
0
def test_triangle_area():
    assert figures.triangle_area(10, 3) == 15
def test2():
    assert triangle_area(3, 4) == 6
예제 #7
0
def test_triangle_area():
    assert triangle_area(4, 4) == 8
    assert triangle_area(1, 2) == 1
def test_triangle_area():
    assert triangle_area(2, 4) == 4
    assert triangle_area(3, 6) == 9
예제 #9
0
def test_triangle_area():
    assert triangle_area(4, 6) == 0.5 * 4 * 6
def test_triangle_area():
    assert triangle_area(1, 2) == 1
    assert triangle_area(10, 20) == 100
예제 #11
0
def test1():
    assert (figures.square_area(5) == 25)
    assert (figures.triangle_area(5, 8) == 20)