Start a new Kumite
AllAgda (Beta)BF (Beta)CCFML (Beta)ClojureCOBOL (Beta)CoffeeScriptCommonLisp (Beta)CoqC++CrystalC#D (Beta)DartElixirElm (Beta)Erlang (Beta)Factor (Beta)Forth (Beta)Fortran (Beta)F#GoGroovyHaskellHaxe (Beta)Idris (Beta)JavaJavaScriptJulia (Beta)Kotlinλ Calculus (Beta)LeanLuaNASMNim (Beta)Objective-C (Beta)OCaml (Beta)Pascal (Beta)Perl (Beta)PHPPowerShell (Beta)Prolog (Beta)PureScript (Beta)PythonR (Beta)RacketRaku (Beta)Reason (Beta)RISC-V (Beta)RubyRustScalaShellSolidity (Beta)SQLSwiftTypeScriptVB (Beta)
Show only mine

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.

Ad
Ad
Code
Diff
  • def temperature_converter(temp: float, conversion='both') -> float:
        convert = {
            'celsius'    : (celsius := round((temp - 32) * (5 / 9) , 2)),
            'fahrenheit' : (fahrenheit := round((temp *  9 / 5) + 32, 2)),
            'both'       : f"{celsius}c, {fahrenheit}f"
        }
        return convert[conversion]
    • def temperature_converter(temp: float, conversion='both') -> float:
    • convert = {}
    • convert['celsius'] = round((temp - 32) * (5 / 9) , 2)
    • convert['fahrenheit'] = round((temp * 9 / 5) + 32, 2)
    • convert['both'] = f"{convert['celsius']}c, {convert['fahrenheit']}f"
    • convert = {
    • 'celsius' : (celsius := round((temp - 32) * (5 / 9) , 2)),
    • 'fahrenheit' : (fahrenheit := round((temp * 9 / 5) + 32, 2)),
    • 'both' : f"{celsius}c, {fahrenheit}f"
    • }
    • return convert[conversion]
Code
Diff
  • import string
    def is_palindrome(s: str) -> bool:
        forward = s.lower().replace(" ", "").translate(str.maketrans('', '', string.punctuation))
        reverse = forward[::-1]
        if forward == reverse:
            return True
        else:
            return False
    • import string
    • def is_palindrome(s: str) -> bool:
    • return (True)
    • forward = s.lower().replace(" ", "").translate(str.maketrans('', '', string.punctuation))
    • reverse = forward[::-1]
    • if forward == reverse:
    • return True
    • else:
    • return False
Code
Diff
  • KumiteFoo=type('',(),{"__init__":lambda s,p:s.__setattr__('c',('No', 'Yes')[sum(map(ord,p.lower()))%324==0]if p else 'No'),"solution":lambda s:s.c})
    
    • def f(s,p):s.c='No'if(p=='')+sum(map(ord,p.lower()))%324else'Yes'
    • KumiteFoo=type('',(),{"__init__":f,"solution":lambda s:s.c})
    • KumiteFoo=type('',(),{"__init__":lambda s,p:s.__setattr__('c',('No', 'Yes')[sum(map(ord,p.lower()))%324==0]if p else 'No'),"solution":lambda s:s.c})
Code
Diff
  • const reverse = str => [...str].reverse().join('');
    • const reverse = str => [...str].reverse();
    • const reverse = str => [...str].reverse().join('');
Code
Diff
  • print("helljo world")
    • print("hello world")
    • print("helljo world")