Ad
  • Custom User Avatar

    The Javascript version of this kata is not working.

    /workspace/node/test.js:14
    import random
    ^^^^^^
    
    SyntaxError: Cannot use import statement outside a module
    
  • Custom User Avatar

    Probably just need to correct the description.

    I came up with a solution that passes if I disregarded that part of the description.

  • Custom User Avatar
    sum of the elements before it (-7 + 1 + 5 + 2) is equal to the sum of elements after it (-4 + 3 + 0).
    

    No, it isn't.

    -7+1+5+2 = 1

    -4+3+0 = -1

  • Custom User Avatar

    Still having trouble with floating point comparisons:

    {msg} - actual and expected differ at index 1 ==> expected: <5.461111421504143E14> but was: <5.4611114215041425E14>
    
  • Custom User Avatar

    Question: What should we return if 'DanS' is not found?

  • Custom User Avatar

    Could you explain this test?

    test.assert_equals(min_wind_strength([9, 8, 7, 6, 5]), 10)
    

    Why isn't a wind strength of 9 sufficient?

    A wind with strength of 9 is enough to collapse the first house. It doesn't matter that the first house does not fall onto the second house because the wind is already stronger than all the remaining houses.

  • Custom User Avatar
    Log
    5:15 am
    Test Failed
      String lengths are both 4. Strings differ at index 2.
      Expected: "0505"
      But was:  "0515"
      -------------^
    

    Random tests sometimes expect the wrong result.

  • Custom User Avatar

    Thanks

  • Custom User Avatar

    Are there any tests where the first character is STAY?

    If so, do you use STAY after UP or STAY after DOWN in that position?

  • Custom User Avatar

    Okay, I think it would be better to say "works for 30 minutes and then takes a 30-minute break".

    "Works for 1 hour" could be taken to mean that they work for one hour before taking a break.

  • Custom User Avatar

    Could you explain how the math works on this example?

    Junior - works for 1 hour with a 30-minute break.
    
    howManyHours('(-{-(-', 'Junior') - result: '10 hour'
    

    Two oaks and one birch take 5 hours to cut down. With a 30-minute break every hour, it takes 7.5 hours. Which rounds up to 8 hours. Why is the result 10 hours?

  • Custom User Avatar

    Can a single word match more than one pattern?

    For example, "The quicklazyexample fox jumps over the dog." if "quicklazyexample" happens to be a valid word.

    If so, does it count as the relevant pattern pairs occurring in a sentence?

  • Custom User Avatar

    Is there an implied ordering within the pair (pattern1, pattern2)?

    i.e. why does the example consider (lazy, quick) as a pair but not (quick, lazy)?

  • Custom User Avatar

    This may or may not be an issue depending on how we want to treat JSON-to-JSON comparisons.

    I had a solution that almost passed, except for spaces around the colons, until I added a replace(..., ':', ' :') around the json field. Comparing my solution to the others, it appears that jsonb_agg() generates slightly different JSON from json_build_object().

    So the tests may be too sensitive with regards to spacing when comparing expected and actual JSON.

  • Custom User Avatar

    nu and de may be switched around in the function args. I tried it the other way and passed.

  • Loading more items...