6 kyu
Qwerty Coordinates -- Strings
107Keozon
Loading description...
Strings
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.
python new test framework is required. updated in this fork
Approved
Python: Random tests are vulnerable to input modification
Fixed by OP
The capitalization rule is literally the worst. It's not clear at all. The time spent guessing how the capitalization rule works is many times greater than the keyboard part.
Please don't make us juggle 10 things at once.
Agreed. I changed the description wording a tad and added a hint about it.
Your solution or you description is wrong:
should equal
The interesting part:
"yuek .,f" should equal "yuek .,F"
(f after a comma musn't be capitalized.)Or this one:
should equal
Wrong parts:
"? ;h" should equal "? ;H"
and"?,p" should equal "?,P"
You have to specify how many spaces are admitted after a punctuation mark.
No clear rule with the character
'
. Sometimes sentence between two'
has to be capitalized, sometimes not.Here for example
That was fun. thnx =)
@Keozon
,Issue:
Initial Solution
,Complete Solution
&Test Cases
) causes this kata to be unavailable for Python 2. This is easily fixed by removing-> str
from each of the function declarations (and: list
from theInitial Solution
).Suggestion
PEP8: Names to Avoid
l
you could use something likekeys
orkey_coordinates
? Even just changing the variable name in the user-facingInitial Solution
would help beginners to avoid picking up a bad habit.Thanks for the kata!
Good advice! Disappointing that there's no way to submit different solutions for python 2 and 3... I will resolve shortly.
Both the variable name PEP8 violation and the type annotations should be fixed, now.
@Keozon
,Thanks for making both those fixes!
Python 2 is still unavailable under
Train
but when I clickEdit Kata
and choose Python 2 and thenValidate Solution
everything works fine. This has been happening for a while (there was even a recent GitHub issue about it) but I can't remember exactly how to fix it. You might have toPublish
again with Python 2 chosen as the default interpreter to get it to unlock Python 2 again.When I try that, I get an error that says "Default Version is not a supported version". I'm guessing that's because somehow Python2 isn't supported?
@Keozon
,Seems to be this same bug again. Usually, when you click
Publish
the tests are run against theComplete Solution
twice, once for each version of Python. As long as at least one of the versions doesn't raise any errors, the kata will publish properly. I'm not exactly sure why it's not working this time since your changes now allow Python 2 to run the tests without errors.I just tried re-publishing this kata with Python 2 as the default and I got that same error message. Sorry I can't be of more help.
@Keozon
,I got it to work! I just added a
#
to your solution code (hopefully you don't mind). I don't know why it worked but I thought maybe changing at least one character might help it.No problem! I realized there was an edge case not covered by the test cases, and the random tests were only intermittently finding it. (Smile's solution being rejected when I made no change to the test cases the first time triggered my search). So, I modified some things, kicked it back in. Both Python 3 and 2 are working for me, now.
@Keozon
,Maybe it was your changes (or something else entirely?) that caused Python 2 to start working. I just was clicking
Publish
a few times and getting that error and as soon as I modified theComplete Solution
the very next click ofPublish
worked. It might have just been lucky timing when I clicked that button.Anyways, just glad it's working now!