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.
I see it too
still present
Whoops, my bad, I put one of my statement in the wrong order in my code.
Sum all the digits... You haven't done that. Not a kata issue.
Java
I having problems in the fruit list aryan-firouzian.
Sample test
public class SolutionTest {
@Test
public void basicTest() {
assertEquals("apple", Kata.subtractSum(10));
}
}
Fruit list from instructions
1-kiwi
2-pear
3-kiwi
4-banana
5-melon
6-banana
7-melon
8-pineapple
9-apple
10-pineapple
11-cucumber
...
Apple is at 9. Yet test is expecting at 10.
I think your fruit list in instruction is incorrect because I am getting mixed results(1 correct 1 wrong for random numbers) whenever clicking 'Attempt'.
Dectector
Palindromization - Java 1.8.0_91(Java 8)
I have problem with the exercise. When I run the sample test without modifying the code I get following error message.
STDERR:
/workspace/java/src/KataTests.java:28: error: class, interface, or enum expected
}
^
1 error
I noticed that there is addition closing curly brace (}) with no opening brace.
Default code
public class Kata {
public static String palindromization(String elements, int n) {
return elements;
}
}
Sample Test
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import org.junit.runners.JUnit4;
public class KataTests {
@Test
public void Error_Cases() {
} // No opening curly brace
}
Thanks for clarifying that. My code is not checking for that, I need to go and fix it.
Yes, that is correct.
Thanks for gettin back to me joh_pot. Can I clarify something regard the instructions.
The function should only return 1 only if the first number contains straight triple and second number contain straight double of the same value digit
E.g.
(451999277, 41177722899) == 1 (num1 -triple 999s and num2 -double 99s)
(451999277L, 411777228L) == 0 (no double 99s in num2)
Hi KKOA
Thanks for replying! I have noticed this on some of my other katas too. Some users will see different tests to what other users will see. I'm not sure if certain users are getting served by another server with a stale cached copy or what's going on. I can guarantee you that what I see when I go to "Edit Kata" is that specific test I pasted up top. I'm sorry but there's nothing I can do about it. For now, just change TripleDouble in the Example Tests to Kata.TripleDouble.
Hi joh_pot
The method arguments on test5 were different from yours for me. Originally it was this
assertEquals(0, TripleDouble(451999277L, 411777228L));
This was cause compile error because it was not call the static method correctly.
I have reset challenge and I am still not getting your method arguments. Below are the sample tests provide to me
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class Tests {
}
This is for java 1.8.0_91(Java 8).
No response. Closing issue.
Hi KKOA
Can you please provide more information on the issue that you are experiencing? For test5 this is what I can see in the example tests:
Java
test5 from sampleTest is incorrect. The static method is being called incorrectly and the expected result is wrong.
Should be correct to the below
@Test
public void test5() {
assertEquals(1, Kata.TripleDouble(451999277L, 411777228L));
}
otherwise test will always fail due compile-time error.
Joh_pot, you need to fix.