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.
It´s easier if you use "if" to validate the occasions when you need to subtract
Ah, thank you.
This is not a kata issue. You need to check the way that you're adding to the total. For every 'I' character, you add one. This is good for something like "III", but in roman numerals, the number four is written as "IV". So, where your code sees it as 6, (1 + 5), this is actually 4. For your code to work, you need to add some kind of conditional check that sees if this 'I' is part of an 'IV' or is just an 'I'
Same issue with the roman number MDXLIV. This is M (1000) + D (500) + XL (40) + IV (4).
This comment is hidden because it contains spoiler information about the solution