28
quarkov
11 32 56 Leader of the month
4384/ 4445
Alex Mahotin
Last seen 31 minutes ago
Member for 6 years, 1 month, 8 days
Difficulty Normal
Engineer (3D modelling, 3D printing).

Best reviews / Newest reviews
Fractions Addition-JimmyCarlos 1 1
Very clean solution. It's also possible to replace .format() method with f-string in line 14: return f"{total.numerator//total.denominator} and {total.numerator % total.denominator}/{total.denominator}" I'm not sure it'd be very readable though. More
First-zaviskapavel 1 1
It's not a proper way to handle data parsing. Precondition says that 0 < xi, yi, r < 10, but it doesn't say xi, yi and r must be integers. For this particular quiz input data had been simplified, but a better way is to think ahead. What if xi is a float? What if it's negative? To make your solution More
list comprehensions-Merzix 1
Why not just [[line[i] for line in data] for i in range(len(data[0]))] ? I also used your approach. I tried to recall without look up how's it to use zip, but failed, u2? =) HNY by the way. More
bfs-fokusd 1 1
Try "}}}()" case. This solution won't go through. More
counter and for and if-babayotta 1
It's also possible to not specify a delimeter for .split() method (just write words.split() instead). This way for this task the result would be the same, but the procedure would be a bit different, read [here](https://docs.python.org/3.7/library/stdtypes.html?highlight=split#str.split) for more i More
29-liner: no looping with property-przemyslaw.daniel 1
Your approach is very good. I also don't like loopings are placed in places they aren't needed in. More
Law of cosines-ural_gorets 1 1
But overdocumented though. There is no need to comment imported modules, there's python documentation existed for those who want to dig into. Your code is quite clear, superfluous comments make it cluttered. For lines 40-43 you could use this snippet: return sorted([alpha, beta, gamma]) if More
First-mpohily 1
List comprehension works faster than invocation of append through the loop. You may fold this part result = els[:2] for i in range(len(els[2:])): result.append(sorted(els[i:i+3])[1]) return result into this line: return els[:2] + [sorted(els[i-2:i+1])[1] for i in range(2, More
Eval() + f-strings = magic-Denis_Gerashchenko 1
Banned "sum"? Pfff, hold my beer! *Typing "s" + "um" instead of "sum". Oh, I like it! More
20-liner: simple-przemyslaw.daniel 1
Solved this task in a similar way. More
First-mazeua 1
You could write one line. [Ax, Ay, Bx, By, Cx, Cy] = map(int, [data[1], data[3], data[7], data[9], data[13], data[15]]) And it's better to use any more general approach to parse strings. For example, this one below gives you the list with all of the numbers from a string. re.findall(r"\d More
Fractions-RomanTT 1
You used a good approach to solve this task. However, here is how you could improve your solution. Take lines 4-6. You may use list comprehension idiom: res = sum([Fraction(i,j) for i, j in fracts]) Further, line №10. You may f-strings. They are more readable than concatenation and a More
Looping over-sergray 1 1
Looks neat. Why not use enumerate for iteration though? I think your solution might look even a bit better: def checkio(text, word): matrix = text.lower().replace(' ', '').split('\n') for row, line in enumerate(matrix): try: start_col = line.index(word) excep More
First-crazyc 1
Hi! I am looking at your solution via rand.solution, so my review may be late. Anyway. 1. Solution is clear and understandable. 2. You could improve readability if you had written _from math import acos, degrees_. This way line 6 is reduced to _alpha = round(degrees(acos((b^2 + c^2 - a^2) / More
First-Tinus_Trotyl 1
I did the same way. Then I discovered .title =) More
First-colinmcnicholl 1 1
Very well. Looks neat. I didn't use regexes for solving this task because I didn't know about them at the time I was solving it. But then I learned python docs [HOWTO](https://docs.python.org/3.7/howto/regex.html) for regexes. There is "Common Problems" section at the end. Among other things More
Four positions of the key-Oleg_Domokeev 1 1
Hi. This solution looks very neat, but apparently lines 14, 15 schema = [list(line) for line in schema.split()] schema = [line for line in schema if '#' in line] could be replaced with one line: schema = [list(line) for line in schema.split() if "#" in line] More
iteratively-Oleg_Skomorokhov 1
I like your solution itself, it's very accurate IMO. Can't say so about the comments. I understand your intention to make it clear for newbies but it works in reverse, leaving your code unclean. Have a look at the lines 6, 7 or 3, 4 e.g. Is there a need for such a comment? Code and comments ha More
First-fed.kz 1
Enlightening usage of eval, thank you. More
1
2 3