7 kyu
Down Arrow With Numbers
391 of 930tfKamran
Loading description...
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.
Scala translation
Approved
Python new test framework + improved description
Approved by 🧙
There is no mention in description that negative numbers will be tested, or how they should be handled.
Fixed in latest python fork
Nice kata but I think this is more of a 6kyu rank.
Python 3 should be enabled.
Second kata so far, thanks for posting. My code seems to work except for a very strange flaw. The first line printed is indented by one space, even if the very first line of the function is "print 'blah'". So the first test fails even though the arrow is constructed and printed properly. Any idea what might be going on? I saw this in my other kata but it didn't effect the test cases for some reason.
Tried cutting and pasting but format didn't translate.
This comment has been hidden.
Cool Kata, this actually took me longer than expected :D
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
haha... glad to see everyone got big long messy solutions in JS with 4loops and all (and not only me). As a feedback all I can say is that I got stuck with the first newline for quite some time not knowing what was wrong, is not a critique though. It looked like the answer matched mine exactly. It made me realize that I have no idea on how to debug invisible string characters... so if anyone know a built in way, please share the tip!
I found you can use
console.dir()
on your result for this case or just test your function in browser's console.As @TheBMachine mentioned
I think it would be good to specify this on the description. It is hard to debug the output and people might not notice that there aren't supposed to have spaces on the right side. I didn't notice it right away.
Accepted.
This comment has been hidden.
Suggestion accepted, updated the description.
Example test cases are already present.
@tfKamaran, I think @TheBMachine meant tests in python.
It's weird, but there were no example tests in python. Not even the default comments.
Anyways, thanks for pointing this out. I have added examples test cases to the python version.
I did indeed mean the Python version. Anyway, thank you both for the fixes. Kata marked as ready.
Random test cases please!
Done.
This comment has been hidden.