16
drednout
5 10 34
1273/ 1445
Alex Ramanau
Last seen 9 months ago
Member for 12 years, 1 month, 9 days
Difficulty Normal
Best reviews / Newest reviews
First-freeman_lex 1
I think that your solution is a little bit complex and difficult to read. Here is some areas, which may be improved: 1) Using lambdas here doens't make any profit, because they don't use any variables from outer scope - just convert them to plain functions(or you can just embed dist/hyp funciton i More
First-yoichi 1 1
Using x, y variables for storing different types of data smells badly:) More
First-vladimir.pekarsky 1 1
Looks good, return median could be performed after if..else. (-1 line of code;) ) More
First-vladimir.pekarsky 1 1
Correct solution, but it could have poor performance on big input. Could we do better? Think about using other data structures, e.g. dict. More
First-s_o_va 1
Not very readable. Can be simplified and more efficient. More
A genious functions!-ermichin158 1 1
Too much duplicate code. Can we do better?:) More
native_when_is_friday-Jon_Red 1 1
A lot of magic here, what is the meaning of all this number inside function body? More
Sol. w/a brief explanation-Ali.Pxl 1
Hi, your solution is pretty straightforward and undestandable! And it has type hints, awesome! However, it may be improved a little bit: 1) Try to move logic with calculation distance and angles to separate function(they may be nested to similar_triangles), it will decrease code duplication and wil More
First-vladimir.pekarsky 1 1
Not bad and clear code, but we can make it more efficient. If you want, you can do the same task in **one cycle for**. Remark: each data.issomething() have one cycle inside. More
First-evilroman
В целом всё ОК. Именование переменных можно улучшить: например x назвать product (произведение), i - digit. More
First-medubin
try ... except pass -> is not OK for this task. And also it's a bad style at all. What if you perform some syntax error inside this block? More
First-evilroman
Generally it's better to gather words into list: letters = [] for each_letter in text: if each_letter.isupper(): letters.append(each_letter) Why? Because appending to list is cheaper than concatenating strings. string in Python are immutable and always copied. More
First-evilroman
What happens with your code, if case of n < 0? More
First-dydemin
>>> min([]) Traceback (most recent call last): File "", line 1, in File "", line 9, in min IndexError: list index out of range Is this desirable behavior? More
First-s_o_va
No **kwargs is needed for min/max according to mission description. You need just the one keyword argument `key`. Min and max can be found more efficient without sorting and copying input data. More
textwrap.wrap-David_Jones
textwrap - hmm, I've never used such battery, very interesting. More
First-tokiojapan55
Using type annotations - good practice. However, it would be better to split solution to multiple functions for better readability. Maybe just move spacer function out of text_formatting. More