16
maurice.makaay
4 22 28
1337/ 1445
Maurice Makaay
Last seen 2 years ago
Member for 9 years, 6 months, 24 days
Difficulty Normal
Best reviews / Newest reviews
First-panaro32 13 1
-1 for posting this under Clear. More
First-Sim0000 8
Although the code is concise, the route that was taken to get to the angle is quite unclear. Here's how one would derive your formula from the basic computational parts: abs(360/12 * (hour%12 + minutes/60) - 360/12 * minutes/5) abs(30 * hour%12 + 30 * minutes/60 - 30 * minutes/5) abs(30 More
First-Kerulen 6 1
This does not deserve the category _Clear_ IMO. This kind of logic: chr(ord(pawn[0])-1)+str(int(pawn[1])-1) really would improve from being moved into a separate function, where the logic is handled in a few lines, so the reader can actually follow what is going on here, as well as getting rid More
ord-gyahun_dash 4 1
The function getdiags() could have a better name. The function is returning board positions on which a pawn would have to be in order to protected the pawn under investigation. I agree that get_board_positions_on_which_a_pawn_would_have_to_be_...etc() would be a bit too long for the code :-) More
Second-Hanna_Hofman 2
A few style things for future development (just if you like them): * The first comment in your functions is really close to a comment that you would normally put there between """....""". If you do so, then the descriptions will be exposed as function documentation. * If you make use of the step d More
First-yarmak_vladislav 2 1
The algorithm is not fully correct it seems. print(decode_vigenere( "DOESNOTWORKINALLCASES", "RVSZBVLKQFYTBHZSQHKSU", "VLFLOUWLCADWSVTHPYGYGBQLGL")) This yields: HEREANEXAMPLEOFABROKENJXZX But it should have yielded: HEREANEXAMPLEOFABROKENCASE More
First-gyahun_dash 2 2
You were able to partly ignore the assignment text with great success: * comparing words to themselves is not affecting the outcome * taking the total score instead of the average is not affecting the outcome I considered this as well, but I wasn't as strong as you were. So a thumb up for bravery! More
First-panaro32 2
Returning 0 on an empty list is a bit hidden in this solution. Of course it works, but it is less explicit than the solutions that do "max(t)-min(t) if t else 0". More
First-bukebuer 2 1
The algorithm is not fully correct it seems. print(decode_vigenere( "DOESNOTWORKINALLCASES", "RVSZBVLKQFYTBHZSQHKSU", "VLFLOUWLCADWSVTHPYGYGBQLGL")) This yields: HEREANIEOTPPEOFABRSRSUCESE But it should have yielded: HEREANEXAMPLEOFABROKENCASE More
First-suic 2 1
Nice shortcut in the end, to use (res > 180). It doesn't make that last line extremely clear, but it's clear enough to not spoil the fun :) More
Indexcept-veky 2 1
From PEP8: "While sometimes it's okay to put an if/for/while with a small body on the same line, never do this for multi-clause statements." More
Radius first, circumscribed as the magic word-maurice.makaay 1
In this solution, I first compute the radius of the circle, based on the three provided points. Secondly, I "draw" some circles using the computed radius around the provided points. These circles intersect in the center of the circle that we are trying to find. Because my first solution made me re More
too many data structures-konev.anton 1 1
too many data structures, but also too little spacing I'd say :) A little hint for code style: try to follow the step down rule for code organization. This means that the order of your functions should be in your code in the order that they are called. The code becomes more readable when one can st More
First-LexCavalera 1 1
You most likely saw this in other solutions already, but in case you didn't: the pattern you have used for the repeated multiplication can also be handled using the reduce() call. Note that this is just a hint and not a "you should have used". Maybe you like it, maybe you don't. If you don't, then s More
First-Sim0000 1
When you feel the need to place comments above relatively large blocks of code, then consider putting those blocks into separate functions. When you give the functions a good name, then you'll see that the comments can be dropped, because they have become inherent to the code. E.g. based on your cod More
First-aggelgian 1
Why would you use a lambda here? -1 for that (based on PEP8, in which the use of lambda's that are bound to an identifier is discourages). More
Asimov's Path Cleaned Up-maurice.makaay
Some small updates to my first version to improve the readability of the code. One thing I found hard to write more clear is the following problem: connection = {"a", "b"} first = "a" next_node = ... (code that results in "b") Possibly, my current solution for the above problem is alre More
First-RuiLima
I like the use of the term "wingman" and the function separation a lot. So much even, that I'll forgive the use of chr/ord logic to get the wingmen's positions :-) I dislike that kind of logic, because it results in invalid board positions like "`0", which are no problem for this particular exercise More
Typed out instead of nested-Morgenes99
The code is hard to read to me. I can perfectly well understand it, but solving one part of the problem using string versions of numbers (for which single digits later on have to be converted back to integers) while solving the other part using numeric logic kind adds a level of cloudiness to the co More
Game, Set & Match-maurice.makaay
Here's another solution, making use of set matching to find the winning combinations. I am aware that instead of : positions & winning_combination == winning_combination I could also have used: positions.issuperset(winning_combination) Coming from the bit-wise world of C, to me the in More
1
2 3 4