Ad
  • Custom User Avatar

    Ok I'll keep it in mind for the future.

  • Custom User Avatar

    One reason could be that there already was almost identical challenge which got retired as a duplicate. Another is that yes, restrictions are usually not difficult to circumvent and the task is very easy to get reduced to regular palindrome check with one additional line for stringification.

  • Custom User Avatar

    (sorry, should have marked this as resolved).

  • Custom User Avatar

    The enemy can attack you because you moved away from a position they could attack you. It doesn't matter where you moved to. This is clearly stated in the description:

    However, an enemy can attack you (whatever your orientation is), as long as you are on an adjacent cell to the enemy (vertically or horizontally, not diagonally) and if one of these conditions is fullfilled:

    • [...]
    • If you move away from them (D&D's opportunity attack :D).

    So, if at the start of your turn you are next to an enemy and are processing the F forward command, you will be attacked, regardless of your direction of movement, regardless of where you end up at. What matters here is that you started next to an enemy.

  • Custom User Avatar

    did exactly the same, some 30 years ago, on the C64 ;-)

  • Custom User Avatar

    A belated thanks for the review and the feedback!

  • Custom User Avatar

    6) on my list is such a case:

    input:    'a5 '
    expected: 'a-\n5 '
    but got:  'a5 '
    

    and it also doesn't hold when there are \n's in the input

    furthermore the description contradicts that by saying that there should be a \n after each vowel

    if you say that there should be exactly one vowel on each line, then one needs to be able to split it into lines and find a vowel in each line. that is not the case.

  • Custom User Avatar

    The reason that the sentence exists is because I want "Ho-\nme-\s" for "Homes" to be wrong and "Ho-\nmes" not
    Also the reason why this is not the case is because my solution might have counter other characters as letters. So string.ascii_letters is used instead of string.printable for the random tests

    Schönen Tag noch!

  • Custom User Avatar
  • Custom User Avatar

    good that it didn't let you down after all

  • Custom User Avatar

    Also, I don't think I've seen a level 5 that doesn't require a loop.

    It can be VERY hard to solve certain problems without a loop. In fact, some performance kata's require a O(1) solution, instead of O(n), so don't judge a kata's difficulty on its flavour for loops.

  • Custom User Avatar

    By the way, what exactly is needed to approve? I sometimes see the green bar "You have the ability to approve this kata. You simply need to edit the kata and set its rank. .... Edit/Approve Kata"

    I see the average rank. But if I republish, it doesn't seem to have any effect. Do I have to edit the description in some way?

  • Custom User Avatar

    Thanks for approving.

    Maybe I should explain why I originally posted the kata at rank 6.

    The book only shows that one example, which is a simple calculation. So I was originally thinking rank 7. When I started extending it to other cases, I realized it was significantly harder. (I was only confident my solution was correct when it matched the results of simulation). But I'm not very good at geometry problems, so I wasn't sure how hard it was. Also, I don't think I've seen a level 5 that doesn't require a loop.

    No insult to the problem was intended. :-)

  • Custom User Avatar

    Remember that you can always check votes using API link.

  • Custom User Avatar

    You approved at correct level. 6 would have been an insult to this problem.

  • Loading more items...