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.
OP solved it, closing
TIP FOR OTHER NEWBIES!
If like me your code is failing the random tests, then as others have said, "don't mutate the original input".
It took me a while to work out what that meant in plain english though.
Basically, don't assign one of the inputs to a variable, eg x = available, and then try to modify the variable.
At least, that's what worked for me.
I've tried to be as helpful as possible without actually giving away the answer, if I've said too much then mark it as spoiler content,or let me know and I'll do so.
I had no problems with the performance on this one.
I was quite pleased, I used this as an alternative to another sudoku validator becasue I wasn't familiar with OOP.
Never mind, I went and leared some basics about OOP (enough for this), but despite my new code passing all the tests, a standard error is thrown up. Never mind, I won't earn any points but I learned a lot and that's the real reason I'm here!
UPDATE: I found a different sudoku challenge, which doesn't require class objects, and my code works fine; so I think it must be an error in my formatting! If anyone can explain this (simply) to me, or point me to some good tutorials in class objects then I'd be very grateful.
This comment is hidden because it contains spoiler information about the solution
I do actually, does that make you feel better about yourself?
I spent hours rewriting and trying to break the code on my machine but it was watertight. I concluded that the kata was bugged because, although the site is great in a lot of ways, a lot of things don't work properly. I was blunt because I was annoyed, I highly doubt you've never done the same.
I admitted my mistake and thanked the user who helped me. I would edit my original post but the website will only let me edit my most recent comment (its things like this that made me conclude the kata was bugged in the first place).
•
"The code works on my end but not here" is not a valid reason to say the kata is bugged in any sense, unless you're implying every single environment works the same way, and you're good enough to be right every single time (hint: you aren't unless you're like the 1% of the Codewars). As you should've seen from the discourse section already over 95% of these "kata is bugged" claims are false, so if you don't have solid evidence to backup your claim (no, "the code works on my end" isn't one. "I can't solve it" or "here's my code" isn't one either) then don't bother, it's most likely to be one of those 95% too.
Also, your tone in the first post is bad. You should feel bad about it and reflect on how you should properly report a question (a question, not an issue. Also you should give enough actual information that helps other to solve the issue, if it exists. You didn't provide the language you're in or anything).
If it's an issue, raise an issue. If it's a code problem (hint: see above), raise a question and post your code in spoilers.
Yes (it's called issue), but it's almost always overused.
You've solved it! It turns out that my code works... but only in python 3.
It runs in python 2 but it gives the wrong result (I would have thought it would have simply crashed).
That was a useful website btw, I'm sure I'll be using it again.
Thanks for the help, I'll be sure to check my settings before blaming the kata in future.
BTW, Scramblies has a performance requirement, it's not buggy.
The proper way is stating the language you're using, this kata has several and we can't guess (or should not) which one you're talking about. Showing your code as you did later is another thing that helps to determine the problem, if it's the kata or your code. Right now I'm on a cell phone and can't check your code. Did you try it in repl.it setting Python version to 2.7?
Thanks for the tip!
First, It works for every test that I've run on my machine, but it doesn't work on the website. I've tried the ones the website says it fails, and they too work fine. I had the same problem with the last kata I tried ('Scramblies' - time out errors, many others experienced them).
Second, what is the way to report an issue? Is there a flag for buggy kata? I'm sure that there are multiple solutions, and some of them DO work, but for those of us who are new it's frustrating trying to figure out what is a website fault and what is due to our own mistakes. I'd rather save others the headache.
https://github.com/Codewars/codewars.com/wiki/Markdown-Formatting
Try using that so your code preserves indentation.
Loading more items...