Spelling correction
def is_more_than_2(n): return n > 2
def is_more_then_2(n):- def is_more_than_2(n):
- return n > 2
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_than_2(randomValue), randomValue > 2)
- 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)