Kumite (ko͞omiˌtā) is the practice of taking techniques learned from Kata and applying them through the act of freestyle sparring.
You can create a new kumite by providing some initial code and optionally some test cases. From there other warriors can spar with you, by enhancing, refactoring and translating your code. There is no limit to how many warriors you can spar with.
A great use for kumite is to begin an idea for a kata as one. You can collaborate with other code warriors until you have it right, then you can convert it to a kata.
import codewars_test as test from solution import reverse_word # test.assert_equals(actual, expected, [optional] message) @test.describe("Main") def test_group(): @test.it("test case") def test_case(): test.assert_equals(reverse_word('olleh'), 'hello') test.assert_equals(reverse_word('ih'), 'hi') test.assert_equals(reverse_word('ecnaidar'), 'radiance')
- import codewars_test as test
# TODO Write testsimport solution # or from solution import example- from solution import reverse_word
- # test.assert_equals(actual, expected, [optional] message)
@test.describe("Example")- @test.describe("Main")
- def test_group():
- @test.it("test case")
- def test_case():
test.assert_equals(1 + 1, 2)- test.assert_equals(reverse_word('olleh'), 'hello')
- test.assert_equals(reverse_word('ih'), 'hi')
- test.assert_equals(reverse_word('ecnaidar'), 'radiance')
use libc
Module Kumite Public Function Min(arr As Single()) as Single Return arr.Min End Function End Module
- Module Kumite
Public Function Min(byref array() As single) as singledim minV as integer = 10for counter as integer = 1 to array().length - 1if array(counter) < min thenreturn minV = array(counter)elsereturn minVend ifnextreturn minV- Public Function Min(arr As Single()) as Single
- Return arr.Min
- End Function
- End Module