Retired
Chemical Name (retired)
36Admiraal
Loading description...
Algorithms
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.
It seems there is a problem with the test with the python, when I try to print the variable name and return nothing, the test shows stuff like this
to_chemical("")
it seems the test is one step behinde the actual test (sorry if it's unclear)Log
admiraal
to_chemical("admiraal")
Log
codewars
to_chemical("codewars")
Log
nam
to_chemical("nam")
Log
namo
to_chemical("namo")
Log
dsb
to_chemical("dsb")
Log
hiphop
to_chemical("hiphop")
Log
baga
Are we supposed to write the Mendeleiev's table by hand? (please no)
ah, sorry
Seems duplicate.
It's not clear what should be done when it is a valid symbol, but it's already used in the previous symbol and can't be rebound:
baga: B -> Ba -> BAg -> ???
According to the instructions, the string is processed character by character and only one previous symbol is checked, so there's no way to get anything forbaga
fromBAg
.Thanks, the instructions were indeed incomplete. I decided to remove these instructions completely, so users have to find a correct algorithm on their own.
Let me know if you think this is a bit to scant.
Looks OK.
you need to constrain a bit more your random generator: for now it almost never generates inputs leading to a valid solution (edit: well, "almost never" is a bit too strong... Let's say "rather rarely")
I now have added the test
valid_symbols
which picks some permutation of the valid symbols, so those will always have a correct answer.I just realized my solution is based on an assumption, so this needs to be clarified in the description (and/or changed on the implementation side):
for now all the chemical symbols are 1 or 2 chars long only (while some 3 char names exist, even if unstable...) => the description need a clear update about that in either case, second question is, do you limit them to 2 chars or do you add 3 chars symbols in the tests?
I have clarified the description; we only consider symbols with 1 or 2 chars. The set of symbols actually stay the same the whole time.
.
Hi,
Nice one, I'd say... ;)
You need to change the checker, because your random generator may generate stuff like this:
=> both are valid (or you need to give more precise constraints and put that test in the fixed tests)
EDIT: you have to say the type of
CHEM_SYMBOLS
, too.Looks pretty clear to me. When you have "IUYNEu", "E" is already fixed and there's no to regroup it according to the instructions. The result should be "IUYNEuBO" though.
right, I didn't really read the instructions, actually, but the expected solution isn't compliant with the requirements, yes.
(edit: just realized the kind of CHEM_SYMBOLS is already given, actually. Or maybe it has been updated, dunno... x) )
I have updated the description and checker; it now only checks if you use all letters and if your result contains valid symbols (if there is a result possible).
This comment has been hidden.
see above (manual notification)
Thanks. It actually turned out my own solution was wrong xd
Tests now also have been updated.
Some tests pass
list
s asname
.Thanks for the notice. Fixed.