You need to sign in or sign up before continuing.×
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.
thanks, that makes sense
In many random tests, all my test rows match except for a few, e.g.
In this example, the last letter of line (n) is shifted to the beginning of line (n+1) compared to the reference solution.
Can I assume that if "123\n4567" is a correct solution, then "1234\n567" is also a correct? Is there a rule to make the solution unique?
It would be great if the random tests could be given an individual heading, or even consecutive numbering. Now every random test has the same name: Input text, Correct answer, and Answer returned.
They both serve a purpose. The text is better for direct eyeballing while the string literals are better for copying for further testing/debugging. If one of them was to be removed it's 1, because it is less exact. But there's no need for that, is there. It's not like it's in the way. What can be done though is to combine them by line breaking string literals in some way such that it can still be copied and evaluated, for example:
.. the real problem here in my opinion is that the input text isn't a string literal
(python)
If a test is not passed, result is displayed twice:
Is it possible to display only 1)?
I want to see the EN DASH character in the text. To do this, I copy the dash character from the sample tests window and execute the following code in python:
the python output is "Unicode-Name: EM DASH".
As I understand the description, an EN DASH was used in the text. Can someone please explain what I am misunderstanding?
Below you can see an excerpt from the description/sample tests in python, I replaced space characters by dots to make it easier to compare. The expected line length is 30 characters.
The sequence of spaces in line (1) is: 2, 2, 2.
The word "at" at the beginning of line (2) could be appended at the end of line (1) if each sequence of 2 spaces would be replace by 1 space, couldn't it?
SMH calculating max() three times for the same values is not according to the DRY programming principle
the JavaScript test suite uses the deprecated
Test
frameworkThe
target_case
listed by the tests is currently inaccurate for python. In your example, the test says it's testing for atarget_case
ofcamel
, but the listed expected value ofjklmn_j_l_m_j_k_lijklm
suggests that it's actually testing for atarget_case
ofsnake
. This probably sent you looking in the wrong place for a bug in your code. I would suggest printing the inputs for now so you can correctly debug your solution and hopefully someone will fix the tests soon.As for the actual problem in your code, your code is failing tests where the input is
camelCase
and thetarget_case
issnake
.Tests in python report that they are testing for a certain
target_case
, but are often actually testing for a completely differenttarget_case
. (The actualtarget_case
passed to the user's function is different than thetarget_case
reported in theit
block message).Tests in python also run the user solution 3 times, followed by 3 tests, making logs look more confusing than they need to be if the user tries to log anything in their solution.
running
print(identifier, target_case)
produces the following output (The lines under "Log" are what my code printed, the other lines are theit
block messages:I think I'm making a mistake with the random tests, because 550 warriors were able to solve the task in Python:
This is the error message:
Can someone please help me?