def kata(a, b): return a * b
Kata=lambda x,y: x*y- def kata(a, b):
- return a * b
# Alternative:# def Kata(string, num):# return string*num
import codewars_test as test from solution import kata @test.describe("Example") def test_group(): @test.it("test case") def test_case(): test.assert_equals(kata('lsadfkj', 3), 'lsadfkjlsadfkjlsadfkj') test.assert_equals(kata('hello', 4), 'hellohellohellohello') test.assert_equals(kata('hu', 0), '')
Test.describe("Basic Tests")test.assert_equals(Kata("lsadfkj", 3), "lsadfkjlsadfkjlsadfkj")test.assert_equals(Kata("hello", 4), "hellohellohellohello")test.assert_equals(Kata("hu", 0), "")- import codewars_test as test
- from solution import kata
- @test.describe("Example")
- def test_group():
- @test.it("test case")
- def test_case():
- test.assert_equals(kata('lsadfkj', 3), 'lsadfkjlsadfkjlsadfkj')
- test.assert_equals(kata('hello', 4), 'hellohellohellohello')
- test.assert_equals(kata('hu', 0), '')
Fundamentals
Arrays
Strings