Ad
  • Custom User Avatar

    Random tests fail in Python too.

  • Custom User Avatar

    In the description you should fix the alphabet to:

    {
      "A" : '@',
      "B" : '8',
      "C" : '(',
      "D" : 'D',
      "E" : '3',
      "F" : 'F',
      "G" : '6',
      "H" : '#',
      "I" : '!',
      "J" : 'J',
      "K" : 'K',
      "L" : '1',
      "M" : 'M',
      "N" : 'N',
      "O" : '0',
      "P" : 'P',
      "Q" : 'Q',
      "R" : 'R',
      "S" : '$',
      "T" : '7',
      "U" : 'U',
      "V" : 'V',
      "W" : 'W',
      "X" : 'X',
      "Y" : 'Y',
      "Z" : '2'
    }
    

    also the base function should be:

    def to_leet_speak(message):
      ...
    

    or something different(text,s,msg), str is a reserved keyword in Python.
    Thanks for the kata.

  • Custom User Avatar

    Why did you put mathematics in the 'Tags'? It should be with basic language function or similar tag. Or if you want to theach how to check it without built in functions than mention it in the description of the kata, or provide some resources for beginners to check possible ways to solve it. Otherwise nice kata! Keep up adding ;)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    def disableLen():
      raise AttributeError("'len' has been disabled for list objects")
    
    def disableSorted():
      raise AttributeError("'sorted' has been disabled for list objects")
    
    def disableEnumerate():
      raise AttributeError("'enumerate' has been disabled for list objects")
    
    def disableAppend():
      raise AttributeError("'append' has been disabled for list objects")
    
    def disablePop():
      raise AttributeError("'pop' has been disabled for list objects")
    
    len = lambda x: disableLen()
    enumerate = lambda x: disableEnumerate()
    sorted = lambda x: disableSorted()
    append = lambda x: disableAppend()
    pop = lambda : disablePop()
    

    that's how I tried it, but couldn't find a straightforward solution to reassign every possible function. What you guys suggest?

  • Custom User Avatar

    Can you guys check it now? Found a way to disable the built-ins, updated the description etc.

  • Custom User Avatar

    I don't really know how to disable built-ins...:S
    The main idea was to totally forbid them, but I couldn't find a workaround while working on this kata.

  • Custom User Avatar

    How can I pass
    "Expected 1.1 * 2.2 * 3.3 == 7.986, got 7.986: 7.986 should equal 7.986000000000001"?

  • Custom User Avatar

    Why not 7210 from 2017?
    Am I missing something?

  • Custom User Avatar

    You can make 7210 from 2017, not 2071 is the biggest.
    Am I missing something?