Ad
  • Custom User Avatar

    That happens when your code isn't right (the tests are added to the end of your code). For instance, deleting pass in the initial code and clicking run sample tests, will give you this:

    File "<string>", line 11
        Test.assert_equals(feast("great blue heron", "garlic naan"), True)
           ^
    IndentationError: expected an indented block
    

    Because all that text didn't enter in one line you see the caret pointing at the space you mentioned. Hope it helped clarify why it happened.

  • Default User Avatar
    • what's the error message exactly?
    • check that you didn't forget to close parenthses somewhere. EDIT: found: arr[len(arr] - 1]
  • Custom User Avatar

    @pcolladosoto

    You are welcome. Please do feel free to ask more questions if such arise in the process. I'm sure most C fans here including myself will be glad to help you.

  • Custom User Avatar

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

  • Custom User Avatar

    @pcolladosoto

    Thank you, we've all been there. After all, I think we are all beginners in some domain.

    Could you please mark your solution as having spoiler content? I'll reply what's wrong with the code in the next post.

  • Custom User Avatar

    @pcolladosoto

    Could you please post your solution here and check the "Mark as having spoiler content" box? I'll take a look.

  • Custom User Avatar

    Ave, @pcolladosoto

    The kind of situation you are describing usually happens when the solution performs invalid operations on memory (e.g. reading/writing memory that does not belong to the solution, de-referencing a NULL pointer, etc.)

    Of course, a bug in the kata/tests code itself can be the case as well.

    Could you please verify that your solution works in your local environment?