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 solved it normally and then changed my solution to this for the lols
Its syntactic sugar of python. Like it
That's not very pythonic of you
yeah I understand now how recursive function work. Thank you bro.
Can somebody explain to me, why we need (n //= 2) (floor division operator) here? I tried my solution with normal division by 2 (n /= 2) and didn't get the desired result -> but if you check the number for being even before dividing by 2, why does it make a difference with the two division operators? Thanks in advance!
1 is added to the return value each time that branch is followed
This comment is hidden because it contains spoiler information about the solution
I tried your solution but what I don't understand is how the if I did not add the one with collatz function I get "1 should equal 8". As my logic says the output shoulde be "7 should equal 8".