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.
Funny and quite mathy kata rather than technical.
oh? so in the case of 0x+b, the kata wouldn't require us to just raise b to the power of n
You can access solutions on the Solutions tab, if you're unable to solve this.
Looking at your current code, why did you move it outside of the function? If you move it back inside, your code might work.
guys whats the answer
Tests do not necessarily test for "-1" being the coefficient of the term with the highest power of the variable (e.g. the x^3 coefficient of (-x+1)^3 is -1). In this case, my original code would have returned -1x^3 + ..., yet it passed because this case was not tested (I ran it again because I removed some
print()
statements, and then it failed).Brilliant kata, though—thanks!
Rust sample tests expect the function to be named
expand_binomial
, but the initial code and the full set of tests expectexpand
.yay i hate math
Since Python 3.9, typing aliases like
Tuple
,List
, orSet
are deprecated because the type themselves (tuple
,list
,set
...) now directly support the[]
operator. The type hints in the initial code should be rewritten in consequenceadded + upgraded to chai assertions for JS + using approximate equality, considering the result is a float
i added this:
I love this kata, I really liked that it can be solved step by step
Fun kata!
Approved
Very good and funny Kata! Thanks to author!!!
i got confused and thought that 0x+b was possible
apparently not
Loading more items...