23
Mikael Desharnais
http://desharnais.fr/
Last seen 7 months ago
Member for 4 years, 12 months, 3 days
Difficulty Normal
Two possible improvements :
- Keep OOP style for the fight method
- Keep encapsulation for the fight method
More
Thank you
I often prefer a code with well named variables and methods to a commented code. It is a bit extreme but sometimes the comments hide the fact that the code is hardly readable.
More
Well done ! Just being able to pass the final test is already a great
success
More
Le dim. 22 sept. 2019 à 11:47, Mikael Desharnais <
mikael.desharnais@gmail.com> a écrit :
More
Very nice and short solution ! Welldonekaël Desharnais
336 rue Léon Porte
38360 Noyarey
please-reply@checkio.org a écrit :
More
Nice and clean
Mikaël Desharnais
336 rue Léon Porte
38360 Noyarey
please-reply@checkio.org a écrit :
More
Pk, could improve OOP style : implement fight method in OOP and implement proper encapsulation
More
The code is OK but you could have done it in a more pythonic way, for
example :
For the first line :
result = [[0]*cols for i in range(rows)]
or even for the whole code :
result = []
for j in range(rows):
result.append(list(range(start+cols*j,start+cols*j)))
if rows%2==1:
result[-
More