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.
all good
What error? Could you please tell me (posting under my comment below, so that I can be notified at once) the test arrays and the test array and the error message?
I tried the whole code also in another environment and seems to work fine, so I need more info (right under JMurphy's reply to my comment is ok) to fix it.
Thanks :)
Quote from description:
...but I guess you figured it out already.
Actually, only one is given in one of the test cases when calling
Plugboard()
without any arguments for testing empty construction. Honestly, I think it should bePlugboard('')
for empty pairing.Yes, that's the idea.
In this exercise, you are required to understand
exception
and how to raise an error whenever an input is outside definition.if you have to many wires, you should raise an exception (anything is fine, but it will be better if you raise
ValueError
)__init__
takes 2 arguments. One isself
which is mandatory, and second,wires
which is defaulted to no wire pairings when not defined. I'd suggest google forPython default parameter
to understand more.