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
I on python,my answer is working but I don't understand why a for loop I have runs twice the same thing with any other loop I try, it for some reason just keep running twice and because of that it gives me the wrong answer. also when I try to run test cases there aren't any.
really interesting and a lot can be learned on this by beginners like me
See above for my reply and thanks for your kind warning :)
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 :)
Hi. The comment above suggests there is a problem with the python test cases? Hopefully you can take a look - I have no idea about it im afraid! Cheers.
When trying out test cases in python it gives an error even when the code works
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.I keep getting this error "TypeError: () takes exactly 1 argument (5 given)" and I don't know what's wrong, it seems to work for the test cases and when I submit it worked and still gives this error and says 2 passed what am I doing wrong?
I need some help, it keep's saying that I have too many wires defines but I made sure that I only have 10 wires, any help? Also sometimes it also says init takes 2 arguments and only one is given? What am I meant to do?
I have the code working but it just won't accept it. It keeps saying 'set([1])' should equal set([1])' what do I do?