Ad
  • Custom User Avatar

    Python 3.8

    Reset/default state code should be changed from

    def kebabize(string):
        #your code here 
    

    to

    def kebabize(_string):
        #your code here
    

    Reason: arguments and variables should not match module names or functions. Style guide says that if they must, leading them with an underscore should be done.

    While this may hold value for teaching kata solvers to examine the arguments given, and change them as they need to - I am uncertain if this is the intended "problem" of this kata. All it does is send greenhorn coders on a wild goose chase trying to answer the error code of...

    "AttributeError: 'str' object has no attribute 'ascii_lowercase'"

    which I do not feel to be easy to resolve as a beginner.

    Now, I do concede it gave me some good troubleshooting experience ("Wait... what happens if I... Oooh!") but, I'm not sure if that's the intended challenge.

  • Custom User Avatar

    There are, but I believe due to size of the description, they do not show on main page.

    It took me a bit to notice you can scroll down kata descriptions - so I suggest just that!

    However one of the examples given was... (note the Whitespaces, Python)

    #1 floor:
    
    tower = ["*"]
    
    #2 floor :
    
    tower = [" * ","***"]
    
    #3 floor : 
    
    tower = ["  *  "," *** ", "*****"]
    
  • Custom User Avatar

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

  • Custom User Avatar

    Are you using print() as a debugging tool?

    If so, consult: https://docs.codewars.com/training/troubleshooting/#maxbuffer

    It should answer all your issues!

  • Custom User Avatar

    That's part of the challenge! Can you recognize the pattern at play?

  • Custom User Avatar

    I really got to learn functions already available in Python.

    My solutions look oversized, and this one makes it feel worse.

  • Custom User Avatar

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

  • Custom User Avatar

    It is clear about repetitions, albeit not in common language.

    "Multiplicity" is the keyword:

    Both a and b must correspond in value, and multiplicity.

    Where multiplicity refers to duplicates.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    A contiguous sequence is as follows.

    A, B, C, D, E , F

    ABC is a contiguous sequence. ABD is not.
    CDEF is a contiguous sequence, ACDEF is not.
    DEF is a contiguous sequence, FED is not.

  • Custom User Avatar

    Delete everything under the def max_sequence(arr): when starting.

    The empty code given by the writer seems to cause issues (probably a sneaky space somewhere).

  • Custom User Avatar

    Are you inserting names or names[n] into the output string? (where n is 0-2 depending on case?) (python, but probably generalisable)

    If you are inserting names, you are inserting a list which has its own formatting.
    If you are inserting names[n], you are inserting a string at location n in the list "names".

  • Custom User Avatar

    You can use print (or equivalent in your language) to make the tests show in console. With good choice of what to print, and notation - you can easily debug why that's happening.

  • Loading more items...