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
The tests are fine, it's your job to make that work:
Tests function is incorrect:
TypeError: hello() missing 1 required positional argument: 'name'
Thanks, pals, the problem was a bad string format. I'm noobie, first time was shitcode, i rewrite it, now it's works good.
I just tried the code from your link, it fails. Try running
print(series_sum(58))
, it prints 2.4, not 2.40.I forked your code to add this line:
print(series_sum(58))
it prints 2.4, not 2.40This comment is hidden because it contains spoiler information about the solution
Floating point numbers in python will eliminate extreneous 0's by default. You can try this:
The above will output
2.4
. In your code, for this test specifically, you are getting a result for sum of2.3965...
, then you are rounding it to 2 decimal places to produce what would be2.40
, but because it's a floating point number and that last 0 doesn't matter, it actually produces2.4
. You then convert it to a string to make'2.4'
. I don't know why this works differently in jupyter notebook for you. If I had to guess, you probably have the test set up incorrectly. Either that, or there's a big problem with the way jupyter notebook handles float values in python.Edit: I just tried your code on jupyter notebook's online demo thing, and it fails there as well.
Tried your code in Repl.it and it also fails there.
Everytings work perfect in Jupiter notebook, 2.4 returned 2.40 , 0 returned 0.00. But here, when i push attempt button, it report error.
This is a question, not an issue. An issue is a bug in the kata itself.
From the description:
Your return value always needs to have 2 decimal places, even if 1 or 2 of those decimal places are '0'. The error you mentioned indicates that you returned an answer of '2.4' instead of '2.40', you're missing a '0' on the end.
Hi everyone, I have passed all 3 tests, but when i push attempt button, program send me error message
'2.4' should equal '2.40'
In IDlE and Jupiter notebook everything works perfect.
What is wrong with this kata?