예제 #1
0
 def test_area(self):
     res = triangle.area(1, 1)
     self.assertIsInstance(
         res, float,
         f"area should return a floating point number when called with 1, 1. Got {type(res)}."
     )
     self.assertAlmostEqual(
         res, 0.5, 3,
         f"area of triangle with sides 1, 1 should be 0.5. Got {res}.")
def main():
    # Call the functions from here
    triangle.hypothenuse(50, 40)
    triangle.area(50, 40)
예제 #3
0
def main():
    # Call the functions from here
    print('area: ', triangle.area(10, 20))
    print('hypo: ', triangle.hypothenuse(10, 20))
예제 #4
0
def main():
    # Call the functions from here
    print(triangle.hypothenuse(5, 6))
    print(triangle.area(5, 6))
예제 #5
0
def main():
    
    print(triangle.area(3, 4))
    print(triangle.hypothenuse(3, 4))
    print(triangle.__version__)
예제 #6
0
def main():
    print("The area is", triangle.area(4, 5))
    print("The hypothenuse is", triangle.hypothenuse(4, 5))
예제 #7
0
def main():
    print(triangle.area(5, 5))
    print(triangle.hypothenuse(5, 5))
예제 #8
0
def main():
    print(triangle.hypothenuse(1,2), triangle.area(1, 2))
예제 #9
0
def main():
    # Call the functions from here
    x, y = float(2), float(3)
    print(triangle.hypothenuse(x, y))
    print(triangle.area(x, y))
def main():
    print(triangle.hypothenuse(10, 20))
    print(triangle.area(30, 40))
def main():
    triangle.area(2, 5)
    triangle.hypothenuse(1, 1)
    print(triangle.__version__)
    print(triangle.__doc__)
    print(triangle.__author__)
def main():
    print(triangle.hypothenuse(1, 1))
    print(triangle.area(2, 3))
예제 #13
0
def main():
    triangle.hypothenuse(3,4)
    triangle.area(3,4)
예제 #14
0
def main():
    two = triangle.hypothenuse(1, 1)
    one = triangle.area(1, 2)