7 kyu
Capitals first!
932 of 2,274iamstone
Loading description...
Strings
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
whats wrong ya in vs code my code is working but :(
It fails every single test here, so I don't know about that...
Updated python test framework
What sort of a kata is this. Description is messed up or maybe I'm that stupid.
(I tried solving with Python)
In the context of this kata, it's a word that starts with a capital letter, maybe capitalized would be a better choice, but there are words with a mixture of letters in both cases and symbols. The definition of word is a little loose too, at least seeing the Python random tests.
Passed! Yes the "uppercase word" means capitalized word and lowercase means un-capitalized. Thank you.
Random test cases don't test for words starting with nonalpha characters (JS).
The issue is rather that the behavior isn't defined for such cases.
This behavior is defined in the description, "If a word starts with a number or special character, skip the word and leave it out of the result."
Adjusted the input on the generator to allow for non-alpha, and increased the test case number.
No random tests cases in Python.
Added.
That was fast, I was doing it myself, but well ;)
I think something is terribly wrong with them.Something is terribly wrong with them. Cliffstamp, please don't jump into fixing stuff without knowing the language well enough.
So I wrote my algorithm in Python 10 minutes ago, which FAILED the random test cases but the results didn't make sense. So I went back for an example, but running the same code then PASSED. I'm wondering if they were just fixed?
I tried to replicate this test "Expected: You, Sort Already! hey me, instead got: Hey You, Sort Me Already!" with my own test, and work's good with my code. Please, can check this?
Description is incredibly misleading as to the actual problem, ruby test cases should be provided.
This was fixed.
No test cases
Language?
Does not always test with a string with only words that start with uppercase or only words that start with lowercase, so this line of code passes when these tests are omitted.
return arrayUpperCase.join(' ') + ' ' + arrayLowerCase.join(' ');
If there are only words that start with uppercase, there will be a trailing space and if there are only words that start with lowercase, there will be a space in front. These errors won't be spotted if these test cases are not generated.
Nice catch, fixed.
Naming convention of 'string' is very bad form in python. If you want to indicate the type of a python variable please use reverse hungarian notation (str_....). If the type of a variable is very important you might not want to be using python
Fixed.
Random tests is needed
Language?
Missing tests cases
Language?
I guess that was JS but it was 2 years ago
I'd love to see the whole test suite included on the original problem page. I have one test not passing, but I can only see the expected output string and not the test input after I try to submit the problem.
just log the input or even return the input if you can't do that so you can see the value.
Sorry, I don't really understand your meaning. What am I logging or returning? The tests? When you say input what are you referring to? When you say value are you refering to the test input?
Print the inputs.
The way it handles certain characters is a bit confusing - for example, I was seeing numbers showing up in the result, but it was unclear why
Language?
Needs some more python test cases I think, including one with words starting with numbers
Fixed.
Can anyone contribute and add Python testcases with random test?
Would be helpful if the description explicitly stated that the order of occurrence of words in the original string needed to be maintained in the result.
Other than that, nice kata!
Changed the description! Please check.
Lookin' good!
tests doesn't work at all with my implementetion, but submit does.
which language?
sorry my fault... It's working ok!
This comment has been hidden.
There is a testcase that has a word that starts with a number.
Suggest removing the guarantee that the string will not be empty.
This comment has been hidden.
Would be good to have a few more tests included by default. Error handling could be a bit better - not easy to see where the error was being raised when I tried to (incorrectly) append one list to another.
Not an issue.
May anyone translate this Kata to Java please! Thanks in advance! :)
I think it needs more testcases.
Well, it does not need more, but better test cases, like using special char words... as described in instructions. The random test case generator is a nice thing, but not very productive and not comprehensive. WOuld be much better to test exactly what's written in the instructions. Nevertheless, nice kata!
Language?
The kata could be edited and approved only if the Python tests were more numerous and above all with random tests.
Great kata :). Keep up the good work :)
JS translation kumited.
(Random tests added) more info on how to approve it ( or not )
Thank you. I updated the Kata according to suic's suggestion so you will have to update your translation. I'd be happy to approve it then.
Done.
I still see your previous solution in the translations mask.
I approved the translation but had to merge the description since I changed it. I hope it was the right version of yours now. Can you double check, please?
Seems ok.
Hi, test cases are not exhaustive and/or in the description is not defined what is (in)valid input.
Are the following strings valid? If yes, what should be the the correct output?
"Th1s is a str!ng."
"This 1s 4 string"
"This is 1234"
Best,
suic
I updated the Kata. Please review...
Hi, it's good now. Thanks.
Ruby translation kumited.
Thank you. I updated the Kata according to suic's suggestion so you will have to update your translation. I'd be happy to approve it then.
I think I've fixed it if you'd like to check
Note: I assumed that words can contain non-alphabetic characters they just can't start with them, if you'd like me to change this just let me know.
I approved the translation but had to merge the description since I changed it. I hope it was the right version of yours now. Can you double check, please?
Some of the test cases I added when I changed the Kata are not in your test setup. You have the check on words starting with characters other than letters in your solution, though, right?
I've added some more basic tests and the words in the random tests can start with non-alphabetic letters, so yes.
In Ruby, if the string contains no words beginning with a capital letter, the test cases expect a leading space. Likewise, if there are no words beginning with a lowercase letter, the test cases expect a trailing space.
Fixed!
Thanks for pointing it out.