Ad
  • Default User Avatar

    I can corroborate this. Solving in Ruby. I sat there clicking "attempt" and watched the pass/fail numbers change 3 or 4 times (despite there being no changes to my code). Very odd. Happy to provide screenshots via email if desired.

  • Default User Avatar

    Yep, this one's on me--was having a rough day and not paying good attention, hence calling myself an asshole. Thanks for pointing this out. I solved it almost immediately after the mention of variable parameters.

  • Default User Avatar

    I do not. Is it something along the lines of def method(*args) and some conditionals for too few/many args?

    I can figure it out from here. I guess I just thought that for an entry level kata (8) it would be helpful to have some indicator/mention of that aspect in the instructions. This feels more like 6-7 rank. Or maybe I just don't have a clue as to the level system here, but it seems like rank 8 stuff is more along the lines of "sum this array" or "fix this code" (when there's just a comma missing).

    TLDR unmentioned variable parameters seems above and beyond general aptitude for rank 8, but I may be way off base with that claim.

    Edit: Well, I guess I'm the asshole this time. I just realized that it is in fact rank 7. My apologies.

    Thank you for the guidance.

  • Default User Avatar

    Encountered an error in the ruby version of this kata, and I'm not sure if it's intended to be part of the kata or not. My code works for the test cases, but when I attempt to submit it I receive the following error about not being passed enough arguments:

    get_percentage': wrong number of arguments (given 1, expected 2) (ArgumentError) from block in
    '
    from block in describe' from measure'
    from describe' from describe'
    from `
    '

    I know this can be done in Ruby as 4/114 completed in thus, but as I don't yet know about exception handling (and it isn't mentioned at all in the instructions), I thought I'd ask.

  • Default User Avatar

    No problem. Thanks for getting back to me, your explanation clarified things quite a bit.

  • Default User Avatar

    Hey there, kweblify.

    I like your solution, very clean. I was wondering if you might briefly explain -- or point me towards some good resources for -- that '?' operator between the indices? Specifically, what is that final line doing? I'm quite new to programming and I'm finding difficulty optimizing my clunky, messy code. Thanks!

    E.N.