Ad
  • Default User Avatar
  • Custom User Avatar

    The i here is just a number, so i+1 is fine. If you had tried to do lines[i+1] then you might run into an issue.

    But also range(0) is empty, so no values are computed for empty lists anyway.

  • Custom User Avatar

    Hi,
    I wrote this code as a starting point but did not expect it to pass all tests.
    I do not understand why it works with empty lists.

    If lines is an empty list, then len(lines)=0.
    So {i+1} should generate an error, shouldn't it ?

    thanks :)

  • Custom User Avatar

    Thank you for taking the time to include an ordered list of katas; it is helping me learn and practice the concept of linked lists.

  • Custom User Avatar

    Hey, I was just reading about the ranking system here: https://airtable.com/embed/shrDt7USqZ7GStRb0/tbly10FthXIRqbd7L/viwJf0lpHrvPCKNfb?blocks=hide (I followed the "Ranking and Honor" link above).

    Under Beta Kata Completed, it says: "Once the kata is ranked you will also earn honor associated with that rank."

    Also, according to this chart, you receive 2 honor for completing a kata in beta and 1 honor for assessing and ranking a kata in beta.

  • Custom User Avatar

    Another enjoyable kata, thank you for your creativity!

  • Custom User Avatar

    Thank you for your comment. You're right, this kata for me was always creating something different to all the other katas on this site. I know it has frustrated a few people but I personally like the challenge of solving the clues to complete the kata. :-)

  • Custom User Avatar

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

  • Custom User Avatar

    In the description, there is a box that makes it look like the "players" argument is a list of letters (I fell for it too at first because of the 8kyu rank), but if we double check the description we can see the "players" argument is actually a list of instances of an object.

    We know ".name" is an attribute of the object. We also know the answer we are looking for is the "goose" instance of the object followed by ".name". So, if you have found the "goose," add ".name" to it. This will return the requested name attribute for the "goose" instance of the object. (This information is all from the description so I am marking it as spoiler-free unless others disagree).

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    Hi! I am having an issue with the random tests. The test is clear about how to handle empty strings, but unclear how to handle strings with only \s\t\n, and the random test cases seem inconsistent in how they handle these characters. I keep failing at 2-5 random test cases that are all empty strings or strings with spaces. I get both "should" and "should not" match results. For example, on the first try, I got these error messages:

    -Your RegEx should NOT match "#several white spaces "

    -Your RegEx should NOT match "" #empty string

    After seeing the above error messages, I altered my RegEx so it would not match empty string or strings with only space characters, but got the following error messages:

    -Your RegEx should match "#several white spaces "

    -Your RegEx should match "" #empty string