Ad
  • Custom User Avatar

    You must import the directives --> using System to be able to do so.

    Anyhow, OP solved it, closing.

  • Default User Avatar

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

  • Default User Avatar

    Thanks for the reply ! i have figured out soon after posting this comment but forgot to mark it as resolved. So far im learning a lot due to the challenges of every kata.

  • Default User Avatar

    Thank you both very much for the explination, I appreciate it.
    I was able to finally solve it, I had to actually test the function locally on my own machine to make sure things were running properly before attempting it on the site.
    And thank you for the "Beginners" channel, I will most definatly be there.
    Have a great rest of your week.

  • Custom User Avatar

    When you click the "Test" button, it runs the "Sample Tests" code. You can write your own test code there.
    When you click the "Attempt" button, it runs the hidden tests which you need to pass in order to finish the Kata.

    The output window will show how your code did in each test, commonly in some format like "passed" or "Expected: 1 -1, but was: 1 0".
    The exact output depends on the programming language and how the tests are written, some might be easier to understand than others.
    In a some case people might be able to figure out what your mistake is simply by what the test error output is, which means you don't have to show your code and mark your post as spolier.

    When the "Attempt" test runs without error, the button will change to a green "Submit" button instead.

  • Custom User Avatar

    I had assumed that the main things needed would be already be imported for us to solve the Katas.

    No, it's not the case. Usually you are provided with some initial stub, but you need to make sure that all the required code is there. With some exceptions, there's usually no code which is added to whatever you write and submit.

  • Default User Avatar

    Hello Deantwo,
    I may have edited the comment later, but I am using Python.
    Thank you for the doc link, I had read the tips and looked at this doc link, but I'm not very clear on it to be honest.
    I type in what I think should be the solution, and I hit the "Test" button to make sure that everything is running before submitting.
    Is that correct way to do it?
    Am I understanding the platform correctly? I just want to make sure I'm using it correctly so that I don't bother the form with silly questions.

  • Custom User Avatar

    See the docs on information on how to use the site.

    And this is the comment section specific for the "Highest to Lowest" Kata, I don't think there is a global messaging section.

    You might want to mention which programming language you are using, as I think almost all programming languages have a Sort method, and your issue might be specifically related to which programming language you are using.
    If you can tell us what the output of the test is, it might be easier to see what your issue is. If that doesn't work you can share your code, just remember to mark your comment as "spoiler".

    I had assumed that the main things needed would be already be imported for us to solve the Katas.

    This definitelly depends on which programming language you are using. But for this Kata, no, the needed imports/usings are not always included. I think it would be too easy if it was, and I might be slightly evil.

  • Default User Avatar

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

  • Custom User Avatar

    The problem is that on your very first line you're trying to assign an integer "n" to be the length of a string. Also, you have "n" as just an integer right now, not an array of integers.

    So, you need to figure out how to convert a string into an array of integers.

    Here is one algorithm that could accomplish that:

    1. Convert a string into an array of characters
    2. Convert the array of characters into an array of integers
    3. Compare the contents of the array of integers to find the largest and smallest
    4. Return the result

    It looks like you have a handle on how to do steps 3 and 4, but you're missing steps 1 and 2.

  • Default User Avatar

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