• Custom User Avatar

    In Python, since Primes.first() is called without instantiating an instance of the Primes class, I believe we have to define first as a static method. If this is not the case, how else could it be written such that the first Primes.first() does not throw an error?

    Then the next question I've been struggling with...if it's a static method without an instance of a class, where would you store the previously calculated values from memoization? In a global variable? Thanks in advance

  • Custom User Avatar

    Nice kata I enjoyed this one. Just a suggestion on the problem description and/or order of operations:

    When calculating the change in value for an item on a given day you first need to decrement the "sell in" field. So for instance to calculate whether a product will decay twice as fast, you actually need to check if the sell in field is equal to one at the start of the loop for the day. I think this should be made clear in the problem description, or personally I would change it. The way the problem description is written seems to imply that the change in daily quality values are calculated using the current "sell in" value.

  • Custom User Avatar

    Sorry I figured it out. My browser (chrome) was just not rendering the strings "LEFT BRACKET name RIGHT BRACKET" when I tried to print them, but was properly rendering them in the project description and the provided print statements. I don't know HTML so that is probably some sort of special combo.

  • Custom User Avatar

    Hi, I this there is an issue on this test using Python. I was using strng.splitlines() and each substring was correct except the "" elements were mysteriously missing from each new string. When I tried simply returning the original phonebook string with no modification I saw the same thing - the "" elements were missing in the string as well.