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 would put spaces around
+
at least. The way you out it, it is not easy to see the end of the first part of the expression.This is the least thing you should worry about regarding speed of Python code.
Well, he just left it like that, why not)
As hard and senseless as it seems, such are many programming tasks on a real-life project. The requirements and the expected result are not 100% clear. That's why you need to do iterations on different data and finalise the result step by step.
Wouldn't checking the iterable lenght every time make it slower?
This comment is hidden because it contains spoiler information about the solution
I think you are not using variable
m
.And too many assignments around
n
.I would use more descriptive variable names too.
This comment is hidden because it contains spoiler information about the solution
It's a good practice to specify exception type if you know it.
Yes, what other thing could they be?
Not in this kata.
Before trying to solve this kata, I don't understand how two numeric arguments represent the dimensions of a 2D rectangle. Are these the lengths of two its sides? Can there be a non-2D triangle?
i think clr is not a very good name for an argument
I am not very experienced with Python and may be mistaken, in Python they don't usually have private fields. At least from the materials I read and the code I saw. Unlike Java for example where encapsulation is essential. Or is this just because most people write bad Python code :D
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution