Ad
  • Custom User Avatar

    I failing with this:

    Got
    ▓▓░░░░
    ░░▓▓▓▓
    ▓▓▓▓░░

    instead of
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░▓▓░░░░░░░░░░░░
    ░░░░░░░░░░▓▓▓▓░░░░░░░░
    ░░░░░░░░▓▓▓▓░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░

    Yet the instructions state the world should be cropped around the living cells. If this is the case, then why is the test case above valid?

  • Custom User Avatar
  • Custom User Avatar

    The world can expand, but should it also shrink? I.e. if there are no living cells on an outer edge, should that outer edge be removed from the world?

  • Custom User Avatar

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

  • Custom User Avatar

    Unclear on some things. So, each time a person drinks, they double and BOTH move to the end of the queue. So, after 5 drinks, everyone has doubled:

    ['Sheldon', 'Sheldon', 'Leonard', 'Leonard', 'Penny', 'Penny', 'Rajesh', 'Rajesh', 'Howard', 'Howard']

    The 6th drink, Sheldon goes again, and doubles. Does this mean all instances of Sheldon double, or just the one drinking at that time? If it's just the one drinking the can, the queue becomes:

    ['Sheldon', 'Leonard', 'Leonard', 'Penny', 'Penny', 'Rajesh', 'Rajesh', 'Howard', 'Howard', 'Sheldon', 'Sheldon']

    Is this correct?

  • Custom User Avatar

    The problem states:

    "We can then assign a number to every word, based on where it falls in an alphabetically sorted list of all words made up of the same set of letters."

    Words made up of the same set of letters can only be 'AB' and 'BA' - since we're dealing with a set? Yet the problem includes examples with 'AAAB', etc

  • Custom User Avatar

    The test case provided seems wrong. Looking at the top row only.
    After 1 generation:

    • First cell dies (correct, it has only 1 living nieghbour).
    • Second cell becomes alive (correct, it has 2 living neighbours).
    • Third cell is dead (INCORRECT, it actually has 2 living neighbours).

    start = [
    [1,0,0],
    [0,1,1],
    [1,1,0]
    ]

    end = [
    [0,1,0],
    [0,0,1],
    [1,1,1]
    ]

    End should be:

    [
    [0, 1, 1],
    [0, 0, 1],
    [1, 1, 1]
    ]

    Will this be fixed, so people can submit their code?

  • Custom User Avatar

    What do you mean by "part of the key"? Create a new key that's a combination of the original key and the plain text? Or does the entire key become the plain text? If it's the latter then is the index position of the plain text char looked up in the dictionary? If so, I can't make that work with the example provided. With a key 'password', the key runs out after 8 increments (0-7) for each char in the key: 'p','a','s','s','w','o','r','d'. All plain text chars are in the dictionary, so we increment each time. So, the key 'runs out' after the 'l' of 'amazingly, and 'y' is the first plain text char that must be handled not using the original key

    returns 'pmsrebxoy rev lvynmylatcwu dkvzyxi bjbswwaib'

    c.encode('amazingly few discotheques provide jukeboxes')

    The index position of 'y' in 'amazingly' is 8, so it's beyond the length of key 'password'. The plain text char 'y' has a cipher char 'r' (index position 17 in the alphabet). And this is where I'm stuck, the Kata doesn't explain what to do when there is no key.

  • Custom User Avatar

    I don't understand how to generate cipher text requirements if the plain text is longer than they key. It's clesr the index of the key is incremented, but there are examples where the plain text is longer.

  • Custom User Avatar

    Also getting Expected 1.1 * 2.2 * 3.3 == 7.986, got 7.986: 7.986 should equal 7.986000000000001

  • Custom User Avatar

    Padding test is broken. Getting this:

    Testing for '4WU-' to 'NFdVLQ'
    'NFdVLQ==' should equal 'NFdVLQ'

  • Custom User Avatar

    A test is failing, that, according to the problem description, should pass:

    [101, 107] should equal None

    For test: gap(6,100,110)

    ...yet both 103 and 107 are primes and the gap is 6.