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.
I fully agree.
I have not solved it yet (nor have I given up, though), yet I managed the related kata asking for the last digit of a^b.
Like you I searched extensively on the web for algos such as modular exponentiation, but I doubt this is the expected method.
Not an issue.
I have just tested your solution with your sum rounded to 15 decimal places and it passed all test cases.
/
Your approach doesn't work for a couple of reasons, the major ones being:
Node
you will get exceptions forenumerate(ls)
andlen(ls)
.return back
because it ends withreturn front
.list
s tofront
andback
but this kata wants linked lists, i.e.Node
objects.front
andback
afterwards.Hmm. Maybe try running the tests again.
Hint : it has something to do with the way you are indexing t_table. Read the description carefully : "You are given a table of critical t values (t_table), containing only positive values of t (the t distribution is symmetrical) which you may access like so : t_table[degrees_of_freedom - 1][probability]."
I'm not a professionnal programmer either, I do it as a hobby. ;)
Funny thing is - I am not a professional developer. I am a medical doctor and also a translator. Coding is just a hobby :) I like it a lot, and the skills I have result from what I've learned through reading manuals + coding on some competitive sites like this one, with special thanks to brilliant solutions and some very helpful comments.
about point two:
;D
The kata rating is given when is in beta by whoever completed the kata. I'm assuming there is some average based on all the kata completions. Not sure if it can be changed now, but I agree this is like a 7kyu imo.
That's not an issue. That's a "suggestion".
Obviously, the problematic line is
mixedf = Fraction(num)
in yourelif floor == 0
branch. After that you return a Fraction objectFraction(2, 3)
, not a string"2/3"
.This kata is indeed a quite complex task for a 5kyu, and Python takes really long time to master its full functionality.
Here are a few tips to tackle this (or other katas/problems afterwards):
You need to read the descriptions ;-)
(Also, next time you should raise code questions as a
question
and not anissue
)Loading more items...