-
Description Spelling correction
Code def is_more_than_2(n): return n > 2
Preloaded Code def is_more_than_2(n): #Add the code here!
Test Cases Failed import codewars_test as test import random # TODO Write tests import solution # or from solution import example # test.assert_equals(actual, expected, [optional] message) .describe("Random test cases") def random_tests(): .it("Random test") def test_case(): for x in range(100): randomValue = random.randint(-1000, 1000) test.assert_equals(is_more_than_2(randomValue), randomValue > 2)
Output:
-
Code def is_more_then_2(n):- def is_more_than_2(n):
- return n > 2
Preloaded Code def is_more_then_2(n):- def is_more_than_2(n):
- #Add the code here!
Test Cases - import codewars_test as test
- import random
- # TODO Write tests
- import solution # or from solution import example
- # test.assert_equals(actual, expected, [optional] message)
- @test.describe("Random test cases")
- def random_tests():
- @test.it("Random test")
- def test_case():
- for x in range(100):
- randomValue = random.randint(-1000, 1000)
test.assert_equals(is_more_then_2(randomValue), randomValue > 2)- test.assert_equals(is_more_than_2(randomValue), randomValue > 2)
- 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 }}