Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
And i went to check if the result is a triangular number .. oops
like it
scientific notation
I used division operator and tests failed for big numbers. I don't understand why
thanks!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This kata is broken, none of the listed solutions work. replicate.reset() is the culprit.
This series is really starting to click for me. Very satisfying and elegant one line solution.
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"?
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.
did you declare/define the exceptions in your code? (you're supposed to)
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?
This comment is hidden because it contains spoiler information about the solution