7 kyu
What is my name score? #1
829 of 1,295manonacodingmission
Loading description...
Strings
Arrays
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.
Not the case in JS && Python
I guess you're using Python. Make sure you select
3.8
version in the trainer, on the right of the language selection box.thanks.I tried that ,too.still didnt work. then I added "import codewars_test as Test", and it worked.
That's weird cause I've just tried leaving from the initial code and my old solution passed without a problem.
Ruby 3.0 should be enabled, see this to learn how to do it
Enabled in this fork
Please use new python test framework.
Done by someone
{'JGEVB': 1, 'OUDCN': 2, 'MXLAS': 3, 'ZWTYP': 4, 'RQIHF': 5}
This was my random alpha, you'll notice K is the letter that was skipped. If you add up the letters of "Luke Skywalker" that exist you get 29. But the test says the correct response is 41. I keep failing tests, but when I add up the example from the random alpa given it matches what my code outputs, not what the expected result is. What am I missing?
I don't know what happened. When I tried the sample tests I failed every one, but when I clicked Attempt I passed them all. I think something is broken in the tests for python.
I believe it's because when you run the full test suite it randomly generates a new alpha dictionary, but the sample tests are still based on the fixed basic alpha. When you run the full test suite, it actually calculates using the new, random alpha, and that's why you passed when it came to the full test suite.
It's just a bug in the kata caused by making alpha a global, preloaded variable instead of a parameter (as it probably should have been). If it causes any problems, you can get around it by resetting the alpha at the beginning of the sample test suite.
(sorry, i know this is an old post, but i'm also leaving this here for anybody having future difficulties with this kata)
The
alpha
dict is randomized in sample tests.Removed
alpha
randomization in Python entirely.bump
The Kata needs a fix. Got NameError: name 'alpha' is not defined.
It's listed as been affected by the changes in the new runner.
https://github.com/Codewars/codewars.com/wiki/List-of-Affected-Kata
in what language? Because it works fine in python.
ok, it has been fixed in the meantime.
The Kata needs a fix. Got NameError: name 'alpha' is not defined. It's listed as been affected by the changes in the new runner. https://github.com/Codewars/codewars.com/wiki/List-of-Affected-Kata
I can't get the
alpha
even runprint alpha
for sample tests. Should be caused by changement of CW..This was added (maybe by you) to the list of affected kata: https://github.com/Codewars/codewars.com/wiki/List-of-Affected-Kata.
Please note a language when reporting issues. This works fine in Ruby for example.
Ruby and Python translations submitted, if you want to approve them.
And thanks for the kata: creating good random test cases for this kind of problem was actually quite fun :)
Approved. Thanks for the translation. Glad you liked it.
This was a nice way to practice working with objects!
Description should make clear that
alpha
will not always be{'ABCDE':1,'FGHIJ':2,'KLMNO':3,'PQRST':4,'UVWXY':5}
.Agreed -- near the end where it says "The alpha object has been preloaded for your convenience ..", maybe that could be changed to "A static alpha object for testing has been preloaded .."? Otherwise that is a bit misleading / easy to misunderstand.
Thank you for the suggestion.