spoiler! x/

This comment is hidden because it contains spoiler information about the solution

why do you think it is more efficient? this function you use is probably doing the same as for-loops answers...

*2 is not the same as **2

*2

**2

I literally had this exact same code and it kept telling me that "Obese" should equal literally every one of them... :S

why use mul instead of explicitly multiplying out?

What that 1 do?

this kata should be evaluated as 8ky somehow

...

Well according to me you can. Just because python gives us much freedom. So you can complete the problem in a number of ways. This is one of them... Also it is much more efficient to use this then using for-loops.

Right, I should have chosen a better name

Even though this is clearly not a recursive function, reusing the name bmi does not seem like best practices to me.

It's O(n^2), not O(n^2 * log(n)). Python caches the sorting criteria, so the code translates into: sorted(LINEAR_FUNCTION(x) for x in arr).

O(n^2)

O(n^2 * log(n))

sorted(LINEAR_FUNCTION(x) for x in arr)

spoiler! x/

This comment is hidden because it contains spoiler information about the solution

why do you think it is more efficient? this function you use is probably doing the same as for-loops answers...

`*2`

is not the same as`**2`

I literally had this exact same code and it kept telling me that "Obese" should equal literally every one of them... :S

This comment is hidden because it contains spoiler information about the solution

why use mul instead of explicitly multiplying out?

This comment is hidden because it contains spoiler information about the solution

What that 1 do?

this kata should be evaluated as 8ky somehow

...

Well according to me you can. Just because python gives us much freedom. So you can complete the problem in a number of ways. This is one of them... Also it is much more efficient to use this then using for-loops.

Right, I should have chosen a better name

Even though this is clearly not a recursive function, reusing the name bmi does not seem like best practices to me.

It's

`O(n^2)`

, not`O(n^2 * log(n))`

. Python caches the sorting criteria, so the code translates into:`sorted(LINEAR_FUNCTION(x) for x in arr)`

.## Loading more items...