7 kyu
Colored Hexes!
288 of 583Caders
Loading description...
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.
https://www.codewars.com/kumite/65243da2e650904d36f19abd?sel=65243da2e650904d36f19abd << Java translation ฅ(≈>ܫ<≈)
approved
Python: fixed tests only have numbers padded to 3 digits, but there are 2- and 1-digit numbers in the random tests.
solved.
This comment has been hidden.
which line code was wrong?
It fails on the Random Tests. It says 'green', 'red', or 'blue' should equal and then lists one of the other primary colors.
This comment has been hidden.
Approved!
@Caders
,I made a few minor updates to your kata.
'..' + '..' + '..'
) but it is better to usestr.join
when there are more than two strings to add togetherstr.join
, it will just create a single stringBasic Tests
in theExample Test Cases
section AND put them in the mainTest Cases
section as welltest.assert_equals
so it matches the order(actual, expected)
0
's to the first example in the description (to match your other examples so that each number has 3 digits)Hopefully you don't mind the changes!
Haha, that's a large mistake on my part! I must've thought I added an empty string and didn't.
Thanks for the tip, I honestly didn't know that strings had a
join()
attribute!Okay, I'll be sure to carry over the
Example Test Cases
next time. ;)Thanks for the revisions!
No problem, just wanted to help out!
Really don't know the use of "senseless edgecases" like addinge an empty string as input after having some working solutions without this special case. It's not important for the "problem" and not important for "coding". Because i often solve these beta katas very early, i often see such changes later on and i always ask me the same: for what? So this point is nothing special for this kata here (so keep on publishing good katas;-)), but more a general point for many katas. Worst case is to have more "edgecases" than codelines for the problem itself... same question here: for what;-)?!
@smile67
,The original kata description clearly states that you were supposed to handle an empty string as an input:
The only part that was missing was the actual test case to make sure your function handled it. I just added that test.
If you look at the kata authors solution, you would also see that the empty string input was being handled ever since the kata was written. It was simply a forgotten test.
Hi
@zebulan
, really quick response:-)... Can't remember the description of yesterday late evening (tired, heavy eyes, ...:-)), so probably you are right;-). I just read the messages, saw this point and many invalid solutions today... So as i wrote, it's often a bad point for many katas and a good place to point it out;-)..@smile67
,I know exactly what you are talking about, I have had many solutions invalidated because of questionable edits to a kata. I agree with you in principle that drastically modifying a kata after many solutions have been submitted should probably be frowned upon (unless it was to fix serious problems!). In this case, there were only a handful of passing solutions (I think about 5?), so I thought it would be better to fix it right away.
I just wanted to reply because the kata did have that in the original description (it's still there). It seems the author did intend to check for empty string inputs (for better or for worse) but just forgot to put in a test for it.
@zebulan
, nothing more to say there's not really a difference;-)@smile67
,The difference is that the kata was written this way from the start (to deal with empty strings in a specific way). A single test checking for that was omitted by accident.