-
Code def is_more_then_2(n): return n == n and n > 2
Test Cases import codewars_test as test # TODO Write tests import solution # or from solution import example # test.assert_equals(actual, expected, [optional] message) .describe("Example") def test_group(): .it("test case") def test_case(): test.assert_equals(is_more_then_2(0), False) test.assert_equals(is_more_then_2(1), False) test.assert_equals(is_more_then_2(2), False) test.assert_equals(is_more_then_2(3), True) test.assert_equals(is_more_then_2(4), True) test.assert_equals(is_more_then_2(5), True)
Output:
-
Code - def is_more_then_2(n):
return n > 2- return n == n and n > 2
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 }}
Please sign in or sign up to leave a comment.