7 kyu
How many arguments
2,939 of 10,511iozoo
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.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
due to conditional markdown blocks, in many languages there are no instructions in the description, only an example. ideally, there should be instructions for all languages
fixed it
This comment has been hidden.
Updated JS to Node 14
Approved by someone
C translation
thanks :)
The given argument is undefinable. First Give integer second gives an array.
there's no specific mention in the kata desc that all arg types will be the same. you just have to count the number of arguments, regardless of their types.
Scala translation
8 lvl of kata...
This comment has been hidden.
8 kyu
I like katas that teach me something. (I am thinking of the Ruby version). Good one!
test.assert_equals(args_count(32, a1=12), 2)
in this test error occurs due to a1....
Read the post of jurrrus below, the test is ok.
Julia translation
thank you)
PHP translation kumited! Please check it 🙂
hi!
This comment has been hidden.
This comment has been hidden.
I do not think there is an issue here ? the Ruby reference solution returns
1
forargs_count("abc")
.This comment has been hidden.
This comment has been hidden.
Thank you for your translation, approved
In Ruby there would be a third case, block argument. That case is ignored.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
That doesn't work for all the tests. Try the kata!:D
Would a javascript translation be helpful, or would it be too easy?
it would be very helpful
.
JS by convention uses camelCase, not snake_case. Please follow this convention ( mostly directed at translator, of course ).
It is possible to change this without breaking existing valid solutions ( though I wouldn't consider it the end of the world to invalidate them, now that there's not too many of them yet ).
Also, the description looks wrong in JavaScript. There's no text, just the examples.
I'd fix this, but I can't.
Kotlin translation written.
Approved, thank you
Wrong test: test.assert_equals(args_count(32, a1=12), 2) TypeError: args_count() got an unexpected keyword argument 'a1'
The test is ok, your code should handle that case too.
Oh yes, of course. I missread the error, everything's fine.
Approved
No random tests.
thank you, fixed