7 kyu
Frugal Pizza
351 of 419saifahn
Loading description...
Fundamentals
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.
If you are given too few arguments, or if they aren't numbers, then return 0. In C# you will be given only numbers.
Then the parameter should be given as a list, also there is no specification in example and sample tests on how to handle this, so it is extra
requirementconfusion to the task...Description should be language-agnostic
I don't like how example tests (for C# at least) do not contain cases for missing parameters. "If you are given too few arguments [...]" can be interpreted in a few ways, and it's somewhat puzzling when you get compilation errors on final tests.
This is an issue, since the requirements do not match with other language(s?) (JS only for now)
Ruby translation. Please check and approve =)
Hi, I have a C# translation Kumited. However, I am a bit confused on how exactly you want the result to be rounded.
Do you want the result to be rounded (e.g. 0.02123 -> 0.02, 0.100321 -> 0.1) or truncated (e.g. 0.108231 -> 0.10)?
The description should explicitly state that the price should be rounded, rather than truncated.
In your random tests, the input you pass into the user function are all numerical strings and not actual numbers but they expect nonzero return values.
Fixed.
Are you kidding me? The day I publish my first kata, you "coincidentally" publish almost the exact same thing? [rolls eyes]
In your example tests you've got the actual and expected parameters reversed -- see https://www.codewars.com/docs/js-slash-coffeescript-test-reference -- which makes error messages look confusing, like this:
Thanks! I've updated it. I think I had the same problem with the actual test cases too. I've also updated the description to say "to two decimal places".