Ad
  • Custom User Avatar

    You are so right my mistake!! I did not read enough thank you for pointing out!

  • Custom User Avatar

    No, your code is outputting the wrong answer. The input is 1021, your code returns 1201, the correct answer is 2110. The task is not to reverse the number, read the description again.

  • Custom User Avatar

    Test1021 is wrong the order is messed up for the test case.

  • Custom User Avatar

    Got confused with options. This was my first comment btw. Taking note of it.

  • Custom User Avatar

    Kata's description is fine, it tells you exactly what you need to do. If you have a suggestion about how to improve it, raise a suggestion, not an issue.

  • Custom User Avatar

    Problem description is not satisfactory. I had to look at the test cases when 'Attempting' to figure out the problem to be solved.

  • Custom User Avatar

    I don't say that it's the best description in the world, but to me it's quite clear that it wants digits in a descending order, and not numbers in a descending order. And it is the same as getting the highest possible number.

    Would you have an idea for a better description?

  • Custom User Avatar

    Not your fault. The problem is written wrong. The first statement says to put them in reverse. The second statement says to re-arrange to get the biggest number.

  • Custom User Avatar

    This problem is misleading. It states to print out the numbers in descending order. That is false. What it is asking is to rearrange the numbers to get the biggest number possible from the number put into the function call. The first and second statements of the description are contradictory. The output fails if it doesn't completely re-arrange the numbers to get the biggest number.

  • Custom User Avatar

    Ahh, jeez. Thanks so much for your time ... rookie error there by me.

  • Custom User Avatar

    There is a typo in your solution, your function is named decending_order but it should be descending_order.

  • Custom User Avatar

    Hi folks,

    I'm very new to this so apologies if this is a foolish question.

    I've built a solution which I belive works as intended, I've tested it with variations of integers and it seems to be working fine, until ... when I add the code into codewars and run it, a syntax error is thrown on this sample test:

    test.assert_equals(descending_order(def), 987654321)

    The error points to def.

    I'd expect the test to read: test.assert_equals(descending_order(123456789), 987654321)

    Is this an error with me or with the test?

  • Custom User Avatar

    thanks :*

  • Custom User Avatar
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Loading more items...