Ad
  • Custom User Avatar

    If numbers contains duplicate values, .index() will always return the index of the first occurance, messing up your results. There are easier ways to keep track of indexes with built-ins in Python.

  • Custom User Avatar

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

  • 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?

  • Custom User Avatar

    Ok Thanks

  • Custom User Avatar

    This is literally what this challenge asks you to figure out :)

    You can try to write some small values on paper and see if some patterns emerge.

  • Custom User Avatar

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