Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • 26362533?v=3

    I did not think of writing it like this XD

  • 215032?v=4

    Is there a trailing space? I had that issue on my first attempt

  • 9130211?v=3

    I respectfully disagree, and this is also why I preserved this test case in the C# version as well. The context does matter, and as @donaldsebleung has pointed out it can be (and likely was meant to be) interpreted as making fun of people who would say a statement.

    Because of this, I don't think there is currently ground to arbitrate that it is racist and ask the author to change his original spec.

  • Profile-pic

    I can understand how the meme itself pokes fun of the sentence, but the sentence in of itself is racist at a minimum, regardless of context.

    Like @tachyonlabs notes, please do consider changing it (Javascript) to virtually anything else, and it'd be less offensive.

    Here are a few examples, I just Googled random English sentences:
    -What would you do if you saw a man from another planet
    -She spent many days knitting a sweater for him
    -Just looking at some books on how to learn English

  • 15776046?v=3

    deleted (cw error, same message as before)

  • 15776046?v=3

    Is it really an argument;-)? The other katas include both solution types, because both solutions are really easy to find. So if you aren't a poweruser, you (very) easy can find these "quicker solutions" after solving the older and "easier ones"... (for really harder but similar katas it's not so easy, but often a discussion point too;-)) By the way i don't think that these solutions here are more difficult to find than "dividing numbers" (your initial code examples) - see the rankings too. I haven't marked an "issue", but i'm sure you normally would do;-)...

  • 14909989?v=3

    Well, then maybe have some more convincing argument:

    People doing this kata right now are of course power users, but don't forget that when beginners are taught programming, they're pretty much discouraged to write the code like currently the solution is ("it's slow", "it's not clear", etc...; they'd write code like the initial solution instead). Yes, what we all write is fast and we do it all the time, but it doesn't make sense to beginners, and they certainly won't think that it's best practice. So nobody in the actual skill level of 8-7kyu will write code like we all write instantly.

    And this kata showcases that performance-wise, the "clever" solution actually also the best practice.

    Now I wish all of you would reconsider your votes :)

  • 14909989?v=3
  • 2389786?v=3

    When running the example tests in Python 3.4.3 I get "NameError: name 'floor' is not defined".

  • 2389786?v=3
  • Profile-pic

    Wow. To be honest, I wasn't expecting it to be solved so fast. Also, your solution is much more elegant than mine, and probably faster, too. Nice one!

  • 11707682?v=3

    Looks cool, but (s + '_') oparation is made every cycle step, and string concatenation is a slow operation.
    May be the interpreter will optimize it, I'm not sure.

  • 7777884?v=3

    Codewars Forums - Kata Best Practices - Have Full Code Coverage

    Having only 5 fixed assertions in your entire test suite is unacceptable as it easily allows logically flawed and/or hardcoded solutions to pass. Please either (1) increase the number of unique, distinct fixed assertions to at least 20 including edge cases or (2) even better, add 100+ random assertions as per standard Codewars practice and is generally favored over just 20+ fixed assertions.

  • 14909989?v=3
  • 18171520?v=3

    Another of your example test cases is differently messed up. What happened to

    Assume that the strings contain only lowercase letters so do not worry about case-sensitivity.

    ?

  • Loading more items...