Move History

Fork Selected
  • Code
    add_arr = sum
    Test Cases
    import codewars_test as test
    from solution import add_arr
    
    @test.describe("Example")
    def test_group():
        @test.it("test case")
        def test_case():
            test.assert_equals(add_arr([1, 2, 3, 4, 5]), 15)
            test.assert_equals(add_arr([1, 100]), 101)
            test.assert_equals(add_arr([15, -8, 418, 98, 12, 43, 66, -9, 44, -13]), 666)
            test.assert_equals(add_arr([75.33, 333.87, 352.31,  -5.88, 21.13 ]), 776.76)
    
  • Code
    • add_arr = lambda foo: sum(foo)
    • add_arr = sum