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 verify_sum(a,b)
      a.sum == b.sum rescue false
    end
    • def verify_sum(a,b)
    • return false if a.nil? || b.nil?
    • a.sum == b.sum
    • a.sum == b.sum rescue false
    • end
Code
Diff
  • converter = lambda n: ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"][n]
    • converter = lambda n: 'zero one two three four five six seven eight nine ten'.split(' ')[n]
    • converter = lambda n: ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"][n]
Fundamentals
Strings
Data Types
Algorithms
Logic
Code
Diff
  • palindrome = lambda w: w[::-1] == w
    • palindrome=lambda w:w[::-1]==w
    • palindrome = lambda w: w[::-1] == w
Code
Diff
  • find_max=max
    
    • find_max = lambda x: max(x)
    • find_max=max
Basic Language Features
Fundamentals
Control Flow
Code
Diff
  • def convert_decimal_roman(n: int) -> str:
        """Converts integer to Roman Numeral string"""
        n = int(n)
        numbers = [1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000]
        romans = ['I', 'IV', 'V', 'IX', 'X', 'XL', 'L', 'XC', 'C', 'CD', 'D', 'CM', 'M']
        idx = len(numbers) - 1
        result = ''
        while n != 0:
            if numbers[idx] <= n:
                result += romans[idx]
                n -= numbers[idx]
            else:
                idx -= 1
        return result
    
    • def convert_decimal_roman(numero):
    • num_romanos_dic = {
    • 1: 'I',
    • 5: 'V',
    • 10: 'X',
    • 50: 'L',
    • 100: 'C',
    • 500: 'D',
    • 1000: 'M'
    • }
    • list_num_rom = [{'key': x, 'value': y} for x, y in num_romanos_dic.items()]
    • size_num = len(numero)
    • output = []
    • for i in range(size_num):
    • num = numero[i:]
    • num_unit = int(num)
    • numextre_izq = int(num[0])
    • pref = []
    • for i in range(1, len(list_num_rom), 2):
    • if num_unit >= list_num_rom[i-1]['key'] and num_unit < list_num_rom[i+1]['key']:
    • pref.append(list_num_rom[i-1]['value'])
    • pref.append(list_num_rom[i]['value'])
    • pref.append(list_num_rom[i+1]['value'])
    • if numextre_izq < 4 and numextre_izq > 0:
    • output.append(pref[0]*numextre_izq)
    • if numextre_izq == 4:
    • output.extend(pref[0:2])
    • if numextre_izq == 5:
    • output.append(pref[1])
    • if numextre_izq > 5 and numextre_izq < 9:
    • output.append(pref[1] + pref[0]*(numextre_izq-5))
    • if numextre_izq == 9:
    • output.extend(pref[::2])
    • output= ''.join(output)
    • return output
    • def convert_decimal_roman(n: int) -> str:
    • """Converts integer to Roman Numeral string"""
    • n = int(n)
    • numbers = [1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000]
    • romans = ['I', 'IV', 'V', 'IX', 'X', 'XL', 'L', 'XC', 'C', 'CD', 'D', 'CM', 'M']
    • idx = len(numbers) - 1
    • result = ''
    • while n != 0:
    • if numbers[idx] <= n:
    • result += romans[idx]
    • n -= numbers[idx]
    • else:
    • idx -= 1
    • return result
Code
Diff
  • def removeNumbers(s):
        x, y, z = '', '', '012345678'
        t = ''.maketrans(x, y, z)
        return s.translate(t)
        
        
    
    • removeNumbers=lambda string:''.join(i for i in string if not i.isnumeric())
    • def removeNumbers(s):
    • x, y, z = '', '', '012345678'
    • t = ''.maketrans(x, y, z)
    • return s.translate(t)