Draft
Oh! My Money!
Loading description...
Regular Expressions
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.
The first 2 test cases are clearly broken, as they ask you to return the value as a Number, instead of a string.
Fixed. Thanks for reporting.
(javascript) i dont get why the first two tests should return numbers, but later ones (even the ones without ",") should return strings. Am i missing something ?
Me too, I had to cheat the first two.
Fixed. Thanks for reporting.
Duplicate: http://www.codewars.com/kata/converting-integer-to-currency-format
Nice Kata
Duplicate
That isn't a duplicate, it is a more involved kata.
However unnamed has noted an expact duplicate in the above.
Function name should be
money
and nottwoOldestAges
!Also kata needs more random tests.fixed.
.
几个问题: 1、用户代码编辑界面的初始代码应该是:
2、example test里面缺少测试的例子 3、总体测试太少,而且没有随机测试,用户很容易硬编码通过。(参见我的欺骗解决方案) 4、kata描述不清晰,没有说明输入类型是什么(我一直以为你给的参数应该是字符串,实际上是数字型),是否需要考虑非法的输入参数(比如当参数是数组、null、undefined应该怎么办,如果需要测试这些,就说明这种情况应该返回什么值,如果不需要测试,就明确对用户说明不需要考虑这些情况),也没有说明应该返回什么类型的值(不过好在很好猜,应该是字符串)。 5、这种kata(给金额加逗号)我已经做了好几个了,有点重复了,建议多创造一些有新意的kata。 如果这是你的第一个kata,还是值得鼓励的,至少你成功地把它发布出来了,尽管有点问题,但是加油!;-)
I think it's better to use english when commenting on kata's this is because now not every one who may contribute to the solving of this issue can aid the kata creator.. as a suggestion for the future...
Ok, my Chinese is not the best (English too) so it was very stressful to translate, but for you i did it and here it is...:
A few questions: 1, the initial code code editor user interface should be:
function money (s) {
} 2, example test which lack examples of test 3, the overall test is too small, and there is no random testing, users can easily through hard-coded. (See my cheat solution) 4, kata description is not clear, did not specify what type of input is (I always thought you should be a string argument to actually numeric), the need to consider illegal input parameters (for example, when the parameter is an array, null, undefined how should I do, if you need to test them, to explain this situation should return to what values, if you do not test, you do not need to explain clearly to the user to consider these circumstances), also did not say what type of value should be returned (but the good news is good guess, should be a string). 5, the kata (amount to a comma) I have done several, a little repeated, it is recommended to create some innovative kata. If this is your first kata, or encouraged, at least you manage to put it out there, though a little problem, but come on! ;-)
Maybe it's a little joke??? ;-)
Thanks for translating :) most of them are fixed.
.
Not enough tests, no random tests;-)...
Thanks for translating.
function template is for
twoOldestAges
and there are no sample tests.fixed
.