Ad
  • Custom User Avatar

    Yes, I think you guessed right. If f is an empty filter object (list(f) == []), then in Python 3 bool(f) returns True which is why you do not get what you expected.

  • Default User Avatar

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

  • Custom User Avatar

    Third line checks if there are any columns, rows or blocks which are not a set of numbers from 1 to 9.
    Second line helps define blocks.
    Does this help you? You can ask more specific questions if you are missing something.

  • Custom User Avatar

    the %s are placeholders
    the string is formatted by replacing the placeholders with the corresponding values from the tupel.

  • Default User Avatar

    Could someone explain the idea of this solution? Thanks!

  • Custom User Avatar
  • Custom User Avatar

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

  • Default User Avatar

    i've passed the test

    I ran your code; it passes the fixed tests (but not all random tests).

    how to check failed random test string values of alice and bob (java)

    You can just jam in some print statements at the beginning of your code, here ya go:

        System.out.println("\n_________________________________________________");
        System.out.println("\nAlice = " + Arrays.toString(alice));
        System.out.println("\nBob = " + Arrays.toString(bob));
        System.out.println("\nword: \"" + word + "\"");
        System.out.println("\nfirst: " + first);
    

    i want it to test on my ide

    You'll have to create those tests yourself in your IDE. You can use the random tests you just printed! Just be careful to copy everything correctly.

  • Custom User Avatar

    java.lang.AssertionError: expected:<-1> but was:<1>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:834)
    at org.junit.Assert.assertEquals(Assert.java:645)
    at org.junit.Assert.assertEquals(Assert.java:631)
    at SolutionTest.randomTests(SolutionTest.java:42)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
    at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:39)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.Iterator.forEachRemaining(Iterator.java:116)
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:79)
    at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:70)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
    at io.qualified.junit5.RunTests.main(RunTests.java:25)

  • Custom User Avatar

    Kata with many details to consider. Nice.
    I learned to use reduce() ... (Python)

  • Custom User Avatar

    hi
    how to check failed random test string values of alice and bob (java)
    i want it to test on my ide
    i've passed the test
    thanks

  • Default User Avatar

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

  • Custom User Avatar

    I just realized, this case is the 3rd example in the description. Well, there it doesn't explain "mere" is not valid, that's shown in the 5th example.

  • Default User Avatar

    Thanks a lot, I finished this kata. Great job!

  • Custom User Avatar

    Ok, thanks
    I didn't realized there was invalid words on the player's memories

  • Loading more items...