Ad
  • Custom User Avatar

    The link posted by 10XL is not relevant for JS so i wouldn't waste my time there.

  • Custom User Avatar

    unmarked it as spoiler

  • Custom User Avatar

    I think that comment is blocked from me. Sorry I am still getting familiar with how this site works.

  • Custom User Avatar

    benjaminadk, the link I posted in my comment above is also relevant for JS and Ruby.

  • Custom User Avatar

    I am also having this problem with javascript. I put an empty object at the leaderboard#position[0] position and I pass every test except the 500 length. Mine is 501. I am going to try to remove a random user and hope to cheat by the tests. However, I am wondering if there is something I am missing or not aware of that will allow me to conform to the desired results. Other than that, cool kata - I had no clue that libraries like cheerio could be brought in.

  • Custom User Avatar

    JS: I have the same problem using an array, either have 501 length or fail the 500 user name. Any pointers?

  • Default User Avatar

    Good kata, really enjoyed it

  • Custom User Avatar

    Yeah, I'm stuck now here, too. I didn't think it was going to be a problem beause simplying shifting the first scraped element worked for the sample tests... but it doesn't work for the main tests. I'm passing all but the one test, which is the 500th user's name. it is in there, but it's not at the 500th index for reasons apostonaut metnioned...

  • Custom User Avatar

    in python2.7 (int / int is int) if you want a float try (float(int) / int)
    in python3 (int / int is float)
    hope this can help you

  • Custom User Avatar

    The second element of the position list has to be the first on the leaderboard, and the 500th element must be the 501st on the list

    This is only true for lists/arrays. Here's a map of python data structures.

  • Custom User Avatar

    General advice:

    1. Get the parameters of the failed test. AFAIK every programming language here at CodeWars has some way to print something.
    2. Get your result.
    3. Re-read the kata's description. There are a lot of issues where the user missed something in the description.
    4. Check your result manually (if possible). There are quite a few issues where the user's result was just wrong.
    5. Check that kata's discourse section if this issue has already been reported.
    6. Add a comment.
    • State your programming language and version as shown at the top of the page.
    • State the parameters of the failed test, your result and the expected result (if available).
    • Add your solution code and mark the comment as "having spoiler content".
    • Label the comment as "Issue".
    1. Give the author a few days to respond.