Ad
  • Custom User Avatar

    Haha was just dropping in to leave this comment.

  • Custom User Avatar

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

  • Custom User Avatar

    random tests added

  • Custom User Avatar

    So tests are designed to check if your solution behave like built-in one.
    This means that it should split given string when is no delimiter (like in quoted doc), but it should arise an error when it's just an empty string. Please try with this distinction.

  • Custom User Avatar

    Ok, I see. You are struggling with two different tests. One is for no delimiter at all (or passed as None), and the second for case when delimiter is empty (like ''). If doubt, try built-in 'some string'.split('')

  • Custom User Avatar

    Hello. I'm not sure if I understood correctly, but I think the point is that it should behave as built-in split, also for cases with incorrect delimiteres (like empty one here).

  • Custom User Avatar

    Yes now it is possible but I won't do it. I had chosen to give irreducible fractions in all languages. I think it is now impossible to invalidate nearly all solutions in all languages.

  • Custom User Avatar

    You should be able to do it now...

  • Custom User Avatar

    That is hilarious because I posted a similar issue

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks! BTW do you know that Guido "hates" reduce which has quite disappeared from Python >= 3...

  • Custom User Avatar
    • See my answer below to @ecolban for lcm(0, 0).
    • Rogue parenthesis removed
    • Reduce is in the title (Reducing...) but I added in the notes:
      • you could google "reduce function (your language)" to have a general view about the reduce functions.

    Thanks again for your post!

  • Custom User Avatar

    Please which language? I don't understand very well your problem:-(

    we take for granted that a year has 360 days, but to find the actual date we use proper dates as in a calendar.

    The 360 days are there only to calculate interest because banks act like this; otherwise they use like everybody else calendar dates...

    If p% is the rate for a year the rate for a day is p divided by 36000 since banks consider that there are 360 days in a year.

    What do you propose for the description?

    As for the "import" it is up to the Codewarrior to import what he needs, no?

  • Custom User Avatar

    Thank you for your kind words.
    I must note that my solutions aren't always original. In this case, I solved the kata in JS (as it was not available in Python at the time) and my solution was far from perfect; then I saw some nice solutions there and based my "elegant" version on those, and translated the kata into Python using the improved version.

  • Custom User Avatar

    You are certainly right but I can't change the tests anymore since more than 500 Codewarriors passed the kata.

  • Loading more items...