-
Description NEVER redefine a builtin function.
Code from operator import add
Test Cases test.assert_equals(add(4, 5), 9) test.assert_equals(add(-2, 5), 3)
Output:
-
Code sum = lambda a, b: a + b- from operator import add
Test Cases # TODO: Replace examples and use TDD development by writing your own tests# These are some of the methods available:# test.expect(boolean, [optional] message)# test.assert_equals(actual, expected, [optional] message)# test.assert_not_equals(actual, expected, [optional] message)test.assert_equals(sum(4,5), 9, "Failed")test.assert_equals(sum(-2,5), 3, "Failed")# You can use Test.describe and Test.it to write BDD style test groupings- test.assert_equals(add(4, 5), 9)
- test.assert_equals(add(-2, 5), 3)
- All
- {{group.name}} ({{group.count}})
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}