Ad
  • Custom User Avatar

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

  • Custom User Avatar

    This kata is broken, none of the listed solutions work. replicate.reset() is the culprit.

  • Custom User Avatar

    This series is really starting to click for me. Very satisfying and elegant one line solution.

  • Custom User Avatar

    Thanks for the feedback (it's my first kata so I'm very much stumbling in the dark).

    I've added random tests, but I'm not sure how to address your other issues.

    How do I change the formatting and what is the "new test framework"?

  • Custom User Avatar

    Yes that's it! I didn't even understand exception classes were a thing so I completely missed that requirement. Thanks for this kata. It's a great challenge and I'm learning a lot.

  • Custom User Avatar

    I feel like I'm so close. The InvalidBond exception seems to be tripping me up.
    I keep receiving this Exit Code message:

    "Traceback (most recent call last):
    File "main.py", line 275, in
    Molecule("").brancher(*branch).bounder(*bonds).closer()
    File "/home/codewarrior/solution.py", line 115, in bounder
    raise Exception('InvalidBond')
    Exception: InvalidBond

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "main.py", line 277, in
    except InvalidBond:
    NameError: name 'InvalidBond' is not defined"

    The code always checks the Atom object to see if the bond in question is valid, then does a raise Exception('InvalidBond') and returns the Molecule object without any changes. Is there something else I should be doing for the exceptions?

  • Custom User Avatar

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