Ad
  • Default User Avatar

    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.

  • Default User Avatar

    I had no problems with the performance on this one.

  • Default User Avatar

    I was quite pleased, I used this as an alternative to another sudoku validator becasue I wasn't familiar with OOP.

  • Default User Avatar

    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!

  • Default User Avatar

    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.

  • Default User Avatar

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

  • Default User Avatar

    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).

  • Default User Avatar

    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.

  • Default User Avatar

    Thanks for the tip!

  • Default User Avatar

    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.

  • Default User Avatar

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

  • Default User Avatar

    Doesn't work. Don't bother.

  • Default User Avatar

    Like every good programmer... I'll just blame the hardware!

  • Default User Avatar

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