23
mu_py
● 6 ● 21 ● 43 Leader of the month
3060/ 3195
Awesome Team Matthias
Last seen 1 month ago
Member for 1 year, 8 months, 22 days
Difficulty Normal
Best reviews / Newest reviews
OOP. Chapter one-swagg010164 2
It's an interesting idea to use a Lightbulb class. If you like, you could condense the code a bit. For example: The function change_state(...) considers 3 cases: a) change_state_time is None #happens at the 1st event only b) state == on c) anything else #equals More
First-dig 2 1
I wasn't able to give -3 points, because the total number has to be non-negative. That's why I decided to give "+3", so the next visitor can fulfill your wish for sure ;-) More
one liner-viktor.chyrkin 2 2
Could you please explain, _why_ you consider this solution to be "creative"? To me it looks quite straightforward. Oh, and please forgive my nosiness, but... Why do you check for `== 0`, instead of writing `checkio = lambda v: str(v) if v % 3 else 'Fizz'` ? More
First-Sim0000 2
thank you for including ascii-graphics. they help lot πŸ‘Œ More
~i-Phil15 2
thanks for bringing `~` back to my attention More
with comment-Sim0000 2
The first condition states "should be bigger than 6", but the code checks for "at least 6": c1 = len(password) >= 6 That should be changed into '>6' or '>=7'. More
My favorite way of solving oduvan's missions :-P-veky 1
it's nice to learn something new about statistics πŸ‘Œ https://en.wikipedia.org/wiki/Mode_(statistics) More
Using index, docs in numpy style.-V.Shkaberda 1
That's a very well documented function. The coding is straight forward πŸ‘Œ More
re, fullmatch, escape-kdim 1
Thank you for this example. Now I know more about regular expressions and how to handle them in Python. Edit: removed second part of my comment, because @amandel was faster ;-) More
Touch of Cohen-veky 1
Thank you for this cultural reference when I expected _him_ the least. And thanks at @9Teen90Three for pointing out the context. More
Second - using yield-H0r4c3 1 1
nice introduction to generators πŸ‘Œ More
int str-lxf42 1 1
nice one-liner on base=10 πŸ‘Œ unfortunately, meanwhile the task changed to any arbitrary base B.... More
if + return????-viktor.chyrkin 1
Could you please explain why you rule out `radix == 15` and `radix == 9` ? In my opinion 'A' to the base of 15 should give '10' and not '-1': >>> int('A',15) 10 More
Explained-Selindian 1 1
straight forward coding, very well documented πŸ‘Œ More
First-vskarpushin 1 1
works fine :) You might replace / by //, so we don't need to convert the result using int() centre = count // 2 if count % 2 == 0 else count // 2 + 1 More
First-oldjaponec 1
clear, straight-forward solution More
That's it?!-Phil15 1 2
I gave 3 points: - one for the solution - two for having "?!" in the subject line Normally I strain to use the most simple solution. But here simply comparing strings alphabetically feels kinda "wrong".... πŸ€·β€β™‚οΈ More
lambda-kdim 1
such simple tasks are a good point to introduce `lambda` , because there's no other code which could bring confusion πŸ‘Œ More
First-Sim0000 1
I wasn't aware that in Python we can simply write 0 <= angle <= 180 Thanks! More
Using for and if-H0r4c3 1 1
nice, straight-forward solution. another way to handle different values of item would be "match-case", which is quite new: https://docs.python.org/3/reference/compound_stmts.html#the-match-statement More
1
2 3 4 5