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.
No real need for the extra line in compile, match will take the pattern as arg
manual notifiation, see above
note: think about the spoiler flag, btw.
This comment is hidden because it contains spoiler information about the solution
I added a preloaded utility function
esc_html
that deals with these shenanigans, so you can safely debug your code with printing. I hope this helps, I am resolving this issue (it's not a kata issue to begin with).I've copied your solution to see what's the case. The formatting IS happening, take a look at the messages the tests are returning - your strings do contain proper tags, just missing some implementation details. Printing the results, however, is problematic; as I mentioned, Codewars is processing HTML tags, not escaping them, so e.g. if you have a string
<th>o</th>
(notice that here the angle brackets are escaped, because of the backtick markup!), when printing to the stdout it will show onlyo
, but upon inspection (ctrl + shift + c in Chrome), you will see that<th>
tags are there. If you want to debug it viaprint
, I suggest doing it like so:print(str_to_be_printed.replace("<", "_").replace(">", "_"))
, it should work.Are tests failing, or you just don't see the expected output via printing to the stdout? HTML tags are processed by Codewars so you need to be careful debugging it like this. Not sure if there's an issue with the kata.
This comment is hidden because it contains spoiler information about the solution
The description clearly explains everything:
There are some conditions in the testing, which are not outlined in the instructions or at least it is not clear to me.
table>thead>tr>th>/th>th>lorem/th>....
It leaves at an empty th>/th> but it does not specify under what circumstances it should be so
The items in the data with None, should match an empty '' string, not specified in the instructions either.
**Sorry cannot complete the HTML tags, because they dont appear in the comment
"The tests will always use some integral number [...]" see description.
This comment is hidden because it contains spoiler information about the solution
Thank you for your feedback guys. I imported this solution from another user and did not pay enough attention. It has been fixed
@zebulan
you quote PEP8 like the Bible, I see you talking about it every day :D.@nicolassilva
is right. According to Python's PEP8,get_real_floor
is correct because it uses snake_case.The only thing that needs to be changed are the function names for the example test cases to match
get_real_floor
.@nicolassilva
,Thanks for the comment, I enjoy learning from other solutions on Codewars.
Just to clarify, I didn't use a
dict
in my solution,WORDS
is a tuple. But I understand your point.Loading more items...