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.
Nice using of f string
You don't get bonus points for hallucinating new problems, so why bother?
to be clear, this is not the best solution as it uses O(n^2 log n) time; Blind4Basics solution is better.
The spoiler flag XD
I think a tenary operator with more than one else starts to be a bit hard to read. But points to you for using count only once.
This is best practices now, ignore comments on second solution with format as they are 5 years old.
There was a time where format was best practices, because many apps still didn't move to a higher python version. But Python 3.6 (first version where f strings released) is no longer supported both development and security wise.
f strings are quite the beauty.
Thank @Awesome A.D.. I did not know.
Please don't post solutions in the discourse without the
spoiler
flag.naming can be improved. The 'c' is not a good varaible name to me.
to be fair, he fixed the code. It was never specified to to keep use the same module
lol, not really , sometimes a code does not have to pass for everything and that may end up defeating the purpose of the code
Any other solution besides this is simply over-engineering.
is it this type of floor as operation same as floor() funtion from the module Math? or it only serve for this purpose? example: you have 2.5 it only gives you 2 as a floor. then f you need to rount up or down then should be the time to use ceil and floor methods?
I was using /n instead of \n and got confused for a good 5 minutes, fml
Loading more items...