Ad
  • Custom User Avatar

    added

  • Custom User Avatar

    it would be appropriate to mention the weight of the lock (next to the description of the weight of the barbe)

  • Default User Avatar

    Switched

  • Default User Avatar

    switch the title to Weight Guide or Weight Assistant

  • Custom User Avatar

    With the nibbles and arbitrary lengths of results, whis does not seem to be a clear duplicate indeed.

  • Custom User Avatar

    To risk sounding like a not real programmer, I honestly admit I never encountered two's complement with non-fixed width representations. All my experiemce with the topic boils down to constant width 32- or 64-bit values, and this probably impacts my understanding of the topic for values which can be arbitrarily extended to the left.

    What can I say other than "smarter every day!" and thank for the lesson :)

  • Custom User Avatar

    "MSB functions as a sign bit" is ( at least an implied ) part of the definition. The bytes / nibbles thing then tells you whether or not to tack on an extra nibble.

    Of course it is possible to spell out everything, but you probably know what I think of spelling out everything.

    At the risk of calling you not a real programmer, I think a real programmer may be expected to know and understand two's complement well enough that it shouldn't be necessary to give a full definition of it. And unreal programmers can go read Wikipedia; that's what it's there for.

  • Default User Avatar

    Changed inner @describe to @it and add some fixed tests to submission tests.

  • Custom User Avatar

    Tests are structured in an incorrect way:

    • calls to assertions should be placed in a function decorated with @it. Assertions inside of @describe are not valid. Most probably you should change the inner @describe to @it.
    • Submission tests should have fixed tests too. Fixed tests could be the same as your example tests, but with failure messages showing inputs.
  • Custom User Avatar
  • Default User Avatar

    already fix it

  • Default User Avatar

    It's simular, but not duplicate.

  • Custom User Avatar
        test.assert_equals(assistance(0), "Error", "Not right!"), 
        test.assert_equals(assistance(20), "Nothing to hang", "Not right!"), 
        test.assert_equals(assistance(22.5), "Error", "Not right!"), 
        test.assert_equals(assistance(25), "Only lock", "Not right!"), 
        test.assert_equals(assistance(30), "1 orange, lock", "Not right!"), 
        test.assert_equals(assistance(35), "1 black, lock", "Not right!"), 
        test.assert_equals(assistance(50), "1 green, 1 orange, lock", "Not right!"), 
        test.assert_equals(assistance(65), "1 blue, lock", "Not right!"), 
        test.assert_equals(assistance(100), "1 red, 1 green, 1 orange, lock", "Not right!"), 
        test.assert_equals(assistance(102.5), "1 red, 1 green, 1 orange, 1 white, lock", "Not right!"), 
        test.assert_equals(assistance(103), "Error", "Not right!"), 
        test.assert_equals(assistance(345), "6 reds, 1 green, lock", "Not right!"), 
    

    On these 12 sample tests on python it says "Not right". Is this supposed to be in this kata?

  • Default User Avatar

    Thanks, i described this case.

  • Custom User Avatar
  • Loading more items...