15
MackM
2 9 24
978/ 1195
Last seen 9 years ago
Member for 9 years, 10 months, 26 days
Difficulty Normal
Best reviews / Newest reviews
First-peter_parada 2 1
Very clean code, I like it! If you cared about how quickly your code ran, editing strings is very slow because Python has to make an entire new string anytime something is changed- it can't just change them in place. For example, result = "" ... result += letter could be More
First-wiking 1
I'd use more descriptive variable names myself, but good code. More
SecretMessage-vikaspace 1
Nice code, I like comparing the lower-case string to the original to find capitals. I have a few suggestions though. - The input is already a string, line 2 is not needed. - The try/except blocks will only ever catch an IndexError if len(texte)==0. You can avoid this by using a for loop instead More
First-iafilatov 1 1
Very well organized code :-) Is there a reason to use a*a/c/c instead of a**2/c**2 or is it just preference? More
amateurish-dmralev 1
This code would be easier to understand if the variables 'b' and 'i' were renamed something more informative. B is the number of pigeons arriving in 1 minute and i is the index of the current pigeon, maybe "Arriving_Birds" and "Bird_Index"? Instead of : pigeons.extend([0 for d in range(b+1 More
First-RuiLima 1
Very easy to follow, nice code. More
First-cbrunet 1 1
Hello! Very nice code. Why do you make a copy of the set of computers under attack at line 8? The set 'infected' is not altered in that for loop. More
Quick and dirty-martinbetz 1
I'm not a fan of the 7-deep nested blocks, and re-iterating over every character so many times. More
First-Nik05
Out of curiosity, any reason to smush it all into one line like that? More
Almost One Line-maket
Is there any particular reason you squished everything into one return statement? More
First-wervyn
You can eliminate line #3 by changing line #1 to: def checkio(feed): Overall this is very clear and concise. More
Recursive Mapping-MackM
Well I feel silly. def Parse_Friendship(String): return String.split('-') Does the same thing much more nicely. Also, the recursive mapping could be stopped as soon as the second name was found to make it run more quickly. More
First-jesusfbes
I have a few ideas for you. Good job naming 'number' something more intuitive :-). Line #4 could be eliminated if you changed line #1 to: def checkio(food): What you call the function arguments doesn't matter to the website's checker. When you want to increase/decrease a number, line More
First-MadHatter
Fancy! I'm having a little trouble understanding it though, what's happening? More
short + easy_to_understand (9th_solved)-Ugen
Very nice! If you want to save yourself a little typing, roman_numerals = anhyeuem[i][rest] + roman_numerals could be replaced by roman_numerals += anhyeuem[i][rest] More
First-hawaiix
I like how you handle removing an element from the front of the queue. More
First-MaartenDeRijk
Very cool method. It doesn't affect the game result, it just rotates the board, but do r0, r1, and r2 hold columns as oriented from game_result? More
First-bokupiko
Hello, I have a few suggestions to make your code look a little nicer :-). Integers are automatically converted to floats by Python if you divide by a float, that's why you need the int() part in line #4. But because of this, line #4 can be simplified to median = (lst[int(len(lst) More
First-Slepice1
Very similar to my approach, so it must be excellent ;-) More
First-yuin
Very concise, nice. If you didn't want to use range() with a guess at what the maximum number of arriving pigeons was, you could use itertoosl.count, which would make it able to handle any number of pigeons. from itertools import count def checkio(data): num_pigeon = 0 f More
1
2 3