6 kyu
String Evaluation
238 of 490sataman
Loading description...
Strings
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.
python new test framework is required. updated in this fork
Approved
CoffeeScript translation
The description should mention how to interpret the condition when:
Are you creating issues just for fun? The description is chrystal clear. You know how to evaluate a boolean, right?
You should assume all three cases:
a < b
(counts of b > counts of a),a < 3
(counts of a < 3) and2 < 3
(integer comparison, True in this case).This is written in the description: "The conditions will be passed in an array and will be formatted like this:
{symbol or digit}{comparison operator}{symbol or digit}"
This comment has been hidden.
I think the description could be more precise if you also gave an abstract description of the conditions, e.g. "Each condition will be of the form {symbol or digit}{comparison operator}{symbol or digit}".
Also, I do not think cases like '0==7' should be tested, since they have nothing to do with the string.
I don't think there's anything wrong with testing
0==7
.So many people, so many opinions ..
I agree completely. It says specifically that the input will contain letters and symbols, not numbers. Very confusing.
Description updated.
Javascript translation
Can someone approve?
Please approve.
@sataman
,I enjoyed this kata, thanks!
Suggestion:
I found your example test cases a bit hard to read. It seems like you split the test cases into different lists to give a user more information if there was an error.
"{actual} should be {expected}".format(actual=actual, expected=expected)
My suggestion would be to re-write the example test cases something like this:
In my opinion, it seems easier to read and a user can figure out exactly what both inputs are and the expected output. I split them up that way so there weren't any PEP8 warnings for lines longer than 80 characters.
Thanks!
done some time ago
Great kata! Thanks, suic