Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I am still struggling with this challenge
if you write a solution in python, you should consider slice instead of using s[-1].
However, it is just a temprary solution to avoid that error, so let me know if you got a better solution.
I am getting "IndexError: string index out of range" error
This comment is hidden because it contains spoiler information about the solution
I am stuck here: 'First a of in' should equal 'First A Of In'
Please mark your post as having spoiler content next time.
This comment is hidden because it contains spoiler information about the solution
See the example in the description, the input is not in the error message, the first value is your wrong answer, the one with less spaces in it and the second one is the expected answer, with double spaces.
This is the test:
I am sorry but the text is not being reversed; what i can see is only the addition of a space between the words
'elbuod decaps sdrow' = > 'elbuod decaps sdrow' (only the spaces added here)
look at the length and the individual bytes of your string - it does not work perfectly, you are not measuring correctly. granted, I can see how that would be confusing, but, it also seems like the sort of thing to watch out for in C with all the footguns available
The error message is:
Your solution does not preserve adjacent spaces.
I need your help guys.
My code passes three tests until I get to the bellow
Expected: 'elbuod decaps sdrow' should equal 'elbuod decaps sdrow'
For the 4th test, my function returns "double spaced words"
If I split the above text into a list then reverse word by word then I will get the following:
elbuod = > double
decaps = > spaced
sdrow = > words
Therefore I expected the final text to be
elbuod decaps sdrow = > double spaced words
I don't understand what is required here