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.
This comment is hidden because it contains spoiler information about the solution
There is a null in one of the arrays in the test. You have to handle it.
This comment is hidden because it contains spoiler information about the solution
No, they're not. Try putting the two strings like this when debugging your code, the difference becomes evident.
Hi @Murathancakir and welcome to Codewars!
I tried debugging your solution, because the code looked OK to me - it turns out it's a spelling rather than a programming mistake!
Currently you have:
'neddle'
but the correct spelling is'needle'
with 2 e's. Now your code should work.'found the neddle at position 30' should equal 'found the needle at position 30'
I dont know what is the problem they seems same to me
Not a kata issue, the function's name should be
find_needle
notfindNeedle
as you have.Sir please import find_needle in the unit test file. Due to this I am not able to run the tests and attempt my solution.
Hi @austang and welcome to Codewars! Currently you are returning a
tuple
made up of 2 components: the first is thestring
'found the needle at the position'
and the 2nd component is theinteger
3
.You need to find a way to return one big
string
:'found the needle at position 3'
.If you are new to Python, you can join the Codewars Discord - link in sidebar on the left - there is a beginners channel where people can help you get started with the site.
('found the needle at the position', 3) should equal 'found the needle at position 3'
That is my error and I dont know what to do in order to fix it. Any help?
Please read this: https://docs.codewars.com/training/troubleshooting
Loading more items...