Retired
NATO Phonetic Alphabet (retired)
2,956 of 5,913user5854572
Loading description...
Strings
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.
There are no test cases. I typed in the populated options and got the nato alphabet back but error still reveiving error for not having test cases
Duplicate issue. As a workaround, press
ATTEMPT
instead ofTEST
.Next time, please mention the language when raising an issue.
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/204.
Please join the discussion to help us identify duplicate kata and retire them.
Retired as a duplicate.
For Ruby getting the following error when running the test/submitting. #<NoMethodError: undefined method `expect' for main:Object
CoffeeScript / JavaScript
No Sample Tests
fixed
Duplicate
this one is the older one though: October 31, 2014 vs Dec 29, 2016 for the one you linked. Deduplication of approved katas is handled on GitHub anyways
Don't comment tests next time please. I was confused why my code doesn't work
I really hope the author of this kata doesn't format functions like this on a regular basis...
I just saw this comment when I opened the homepage. Curiosity got the best of me and I just had to check it out.
My god.
python fork with new test framework
Approved
Am not happy with myself concerning this kata. first of all how would i have download the letters dict.2 i was thinking the word was either single word or sentence.Am not please with myself.
C translation (author gone)
JS fork with Node 14, correct function name in the description, sample tests, and a preloaded dictionary
Approved!
In python the preloaded X-ray is wrong. R should be r to match the testcases.
i dont see an
'X-Ray'
anywhere in the Python codeRuby 3.0 should be enabled.
fixed
Crystal translation submitted :)
This comment has been hidden.
Okay, so after experimenting with my code. I realized I wasn't testing for upper case letters, nor was I returning a string in 'quotes'. Once I tested for this i passed.
It could be a use of English I'm not familiar with but I think there is a typo in the first sentence of the description: it should say "In this kata, we're going to create the function nato that takes a word and returns a string THAT spells the word using the NATO phonetic alphabet."
changed
Is there a bug in the Ruby version?
That's not dabble, that's delta alpha bravo bravo lima echo (dabble in nato alphabet in nato alphabet)
seems to be fixed
Comparison?
I have no trailing/leading spaces, and the code returns exactly what is expected.
Similar thing happens with this:
Had the same problem. I used print instead of return -.-
Is there an issue with the Ruby version? I'm getting this error on Submit, I'm sure it is part of the test that I'm failing, but it happens even when the entire function is commented out.
This comment has been hidden.
This comment has been hidden.
It should be solved now; if not, let me know!
This comment has been hidden.
Add test cases please.
Thanks for your kata, Eclecticist :)
I have just translated it in Ruby, including also your good load of random tests, if you wish to add this version too :)
Thanks for translating this into ruby, but there is an error in the test cases. Check on line 15 of the test cases - there's a "$" that shouldn't be there.
Thanks for pointing out the problem. I think I solved it putting a $letter hash in the preloaded code, let me know if you see any issue with it anyway.
When I run my code on another ide it returns "BRAVO ALPHA BRAVO BRAVO LIME ECHO" , however when I run the code in through Kata's very own IDE it returns "BRAVO ALPHA BRAVO BRAVO LIME ECHO BRAVO ALPHA BRAVO BRAVO LIME ECHO" It doubles for reasons I can't understand????
Ahem ;). That being said, you should provide more information. Which language, and what's your solution (mark as having spoiler content!)?
This comment has been hidden.
What happens to
empty_return
if you callnato
twice? Tryconsole.log(nato("a")); console.log(nato("b"))
. What's the expected output? What's your output? If you can answer all those questions, you should be able to fix your problem. Also, please use code blocks to post code. Either```
backticks:Or indent your code by 4 spaces.
Good luck.
Thank you. I had to feed '''empty_return''' into the nested function for my solution. Thanks for your explanations.
This comment has been hidden.
When you've got
Unknown Error
you may :Unknown Error
may also occur when you try toRun Test
and there's no test inYour Test Cases
:)This comment has been hidden.
You return from your function on the first pass through the loop. Try accumulating a value then returning it.
Good job.
The trailing space issue for the last word is somewhat difficult to detect.
This comment has been hidden.
Hmmm, would you mind posting your code here with a spoiler tag? I can't seem to reproduce the error. My guess is that you may have had a leading or trailing space somewhere.
I was using strict comparisons. I just changed it to use
assertSimilar
. Let me know if that doesn't fix the problem for you :)This was a trailing space (you can select the extra space at the end of the "instead" sentence); I'm not sure if assertSimilar will help in this instance (I think for Strings assertEquals and assertSimilar are identical).
On the plus side, it's good practice for people to hunt down those trailing spaces (or use a technique where it won't occur).