Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Welp just learned that dictionary comprehension is apparently a thing... Much appreciated for that ITSOES!
This comment is hidden because it contains spoiler information about the solution
for python 2.7 my code was simply:
return false
And it passed with flying colors. Not sure that was the intention.
This comment is hidden because it contains spoiler information about the solution
This totally meets the definition of 'clever'. Creative and would never want to see this in production!
Well played sir. Well played.
This comment is hidden because it contains spoiler information about the solution
First question:
How does the enumerate for loop insert blank spaces? I see nothing about assigning blank spaces in there, just the line justification.
I put a bnuch of print lines in the code and it just magically goes from nothing to filled with blank spaces with that one line!!!
Nevermind, my bad. User error. I was using "employee" instead of "employees" and also didn't understand that an object literal in JS is somewhat equivalent to a hash in ruby. I was using it as an array of arrays instead of an array of hashes. I learned something new about JS so we'll call it a success.
For reference, this is in python, but not JS (I don't know about in Ruby).
Just completed JS; did not encounter such an error. Could you post your code with
spoiler
?In the description, you say
However, one of the test cases tests for the name 'Anna'. You should either change that test case, or put in the description what to do with an invalid name as input.
The javascript also returns an error similar to the ruby version "ReferenceError: employee is not defined". Also the description doesnt have any info on the arrays structure. Is it a double array? One long string?
That's when you should return your guess e.g.
Return guess;
I think this kind of misses the point of the kata. It feels like your 'clever' solution was really just a cheat. For some of the Katas the point is to figure out 'clever' solutions (aka cheat) but not this one. Or maybe its just a game.
Is it possible to get some more descriptive feedback? I generally get either Nope or Wrong number, sometimes with a runtime error. But im not sure what the issue with my code is. Perhaps some test cases with the output of our guesses. That way based on whats happening with your guess you can figure out the problem with your code.
Loading more items...