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
This comment is hidden because it contains spoiler information about the solution
Yes, like a lot of people did using "json.dumps". You just create a non-organized string from a very exploitable native python dictionary.
Very naughty! It would have been interesting to actually have a json representation of the data as a string, 'json.loads' it and get data from it. Here we already have a parsed structure native to python, it's a complete non-sense!
Mathematically, it the same, but sometimes, we lose sense with over-refactoring.
Your answer is really clear and your replacement of basis is smart, you explained me my algorithm after 2 years of forgetting, thank you :)
Duly noted, sir :)
I'm always reluctant to use external dependancies for simple programs :/
With Counter, you can use "cb[char]" and get 0 if char is not in cb without exception, no need to use the failsafe .get(, 0)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
No, but 547 is the closest solution to 500.
<Create a function that given an integer n and the order k, will output the higher and closest forgiving number to n of order k>
In this exercise, it's neither needed nor recommanded to store all the values.
It's a better practice to use 'is' operator than '_ _eq _ _' (i.e. '==' and '!='), which can be overwritten and provoke weird behaviour.
Very elegant
Codes are written for a certain context with according tests.
If you want to take into account any possible weird input, the work is not the same!
Loading more items...