• ###### Supergary21commented on "Hands Up" python solution

I think that n%3 mean that a number divide by 3 and what you want is the remainder. n//3%3 mean that you are diving the number dirst and rounding it down, then you are doinging another division and looking for it's remainder. Same with n//9%3 This just mean that you are dividing by 9 first and rounding down, then you divide by 3 and get the remainder.
For example;
5%3 would have a remainder of 2.
5//3%3 would be 1.66 and round down would have 1, then you find the remainder which is 1.
12//9%3 would be 1.33 and round down you get 1, then you find the remainder of 1/3 which is 1.

• ###### dhruvkcommented on "Hands Up" python solution

I mean how you are calculating the exact hands by dividing. I could think of three nested(one for each person ) for loops that gives me array of numbers, but I was failing to stop the 3 nested at exact hands given as input

• ###### mortonfoxcommented on "Hands Up" python solution

In the table given in the kata description, observe that P1, P2, P3 are simply counting in ternary. So this kata is an exercise in converting a decimal integer to ternary.

• ###### dhruvkcommented on "Hands Up" python solution

Can you please explain this solution

• ###### Eskay81commented on "Is it a number?" python solution

What if the string = '0.1' ?

thanks

• ###### romulusFRcommented on "First Kumite" kumite

Named values are clearer than tuples IMHO : convert[0] ad convert[1], which one is a in a*x + b ?. Actually, NamedTuple would be even better

• ###### vraboshcommented on "Get the integers between two numbers" python solution

Here the goal was to show how you can work with lambda and other python chips, so that newcomers learn something new.

• ###### Typhuscommented on "Get the integers between two numbers" python solution

It is bad practice to assign a lambda to a variable. PEP8 states that its an Anti-Pattern.
Just declare a normal function if you want to use it more than once.

• ###### vraboshcommented on "Get the integers between two numbers" python solution

Why bad practice? If this needs to be done, let's say in the key= or somewhere else like that. Here's an awkward example: arr = [(1,4),(2,3),(1,3)]; sorted(arr, key = lambda e: sum([*range(*e)]))

Yes, so?

• ###### šš±šš±šš±šcommented on "Ensure question" python solution

Would this not potentially turn `<original_string>??` into `<original_string>?`

• ###### Blind4Basicscommented on "Status Arrays" python solution

`O(nĀ²)`...

• ###### sanieacommented on "Status Arrays" python solution

nice! I was trying to figure out how to convert my two for loops into list comprehension but couldn't figure out the summation trick.