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.
Hi @stas0601019 and welcome to Codewars!
This error message means "You returned True, the correct answer is False"
I copied your solution and added a print statement:
print(text, ending)
to see which inputs are failing. This is a very useful tool for debugging your solution on Codewars on most katas.It turns out your code fails on input text "samurai" and ending "ra". Your code returns
True
(because "ra" isin
"samurai") but as you can see the word "samurai" does not end in "ra" so the correct answer should beFalse
.