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 seems like you are returning a list which contains [3] in stead of the integer 3
Running my solution in Python compiler it runs fine - and test examples return correct answers. When I enter this into codewars it fails. For example, it gives error message:
✘ [3] should equal 3
when my solution does return 3. Have other python users experienced similar issues? I note a similar post from shpilliwilliams(7 kyu) 4 weeks ago.
I am also experiencing similar problems with the population growth challenge.
Test.describe("nb_year")
Test.it("Basic tests")
Test.assert_equals(nb_year(1500, 5, 100, 5000), 15)
Test.assert_equals(nb_year(1500000, 2.5, 10000, 2000000), 10)
Test.assert_equals(nb_year(1500000, 0.25, 1000, 2000000), 94)
I am failing the top basic test - returning 17.
And failing the bottom basic test, returning 96. But calculating these on a BAII suggests that 17 and 96 are the correct answers. Am I missing something here? I assumed initially I had some float/int rounding errors but can't see an obvious solution beyond what I have already.