Nov. 23, 2017, 1:39 p.m. |
+ 1 |
for Comment
shimokawa.naoaki: im so sorry... i was completely misunderstood ... Question require order in Alphabet... i thought fi...
|
Nov. 23, 2017, 1:39 p.m. |
+ 1 |
for Comment
Bilou06: First, you should clean-up your code if you ask for help: 1. if "k" is a boolean, use True and False...
|
Nov. 23, 2017, 1:39 p.m. |
+ 1 |
for Comment
veky: Nice contortions you're going through just to get it all in one line. I even learned something (loca...
|
Nov. 23, 2017, 1:39 p.m. |
+ 1 |
for Comment
Cjkjvfnby: In that case generator comprehension is good choice, because map will need user defined function. I ...
|
Nov. 23, 2017, 1:39 p.m. |
+ 1 |
for Comment
profuel_39643665ff7744e3bff926: Please read about algorithms of type 'backtrace'. Main idea here is that it's not always true that p...
|
Nov. 23, 2017, 1:39 p.m. |
+ 1 |
for Comment
veky: Since people have asked me how would I write the same solution if I was writing professionally, here...
|
Nov. 23, 2017, 1:39 p.m. |
+ 1 |
for Comment
AndriusMk: ...Then what is it? I thought this game was for as interesting and as unconventional solutions of ea...
|
Nov. 23, 2017, 1:39 p.m. |
+ 1 |
for Comment
Vachenzo: While many programmers would use software with auto-complete functionality, we want our players to l...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
Vachenzo: Hmmm. This calls for the construction of an Earth-sized computer to calculate the question.
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: Same as mine. And not O(1), of course. Don't listen to those who say "while True" is bad style. It's...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
nickie: For a decrypted version, check my [other solution](http://www.checkio.org/mission/number-factory/pub...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: > You use double lookup in other code > while "." in P: P.remove(".") Yes, in case you didn't notice...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
muchosalsa: thank you!
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
melpon: Python 3.x doesn't have xrange. You should use range. Python 2.x's xrange is same as Python 3.x's ra...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
tihenko: At first had some troubles with getting same accuracy as in answers. The task is rather tricky for u...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: > Single line changes everything :) Of course, because you can only put so much code in a single lin...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: A bit of both. The first version I write is usually a bit longer than what I finally publish, but I'...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: I have _never_ seen such a definition. Do you have a reference? The closest thing I've seen is the d...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
Vachenzo: Really it's for anyone who uses Python that is looking for a fun way to learn and practice their cod...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
chibiidol: Im going to be a freshman majoring in computer science starting in the fall. and Im only 71% done wi...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
profuel_39643665ff7744e3bff926: it's very not allowed to change array you're iterating. Create a copy and modify copy, while iterati...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: > And I'm a bit unhappy with this kind of sum-constructs anyway, since I feel that a pythonic versio...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
kvas: It's actually fun to figure out the math in this and other problems, and it's really not hard at all...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
sweeneytodd94: Hi Bryan, each task requires you to return the correct data with the **checkio** function. The autom...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
oduvan: Thanks for your feedback! > One potential problem is relying too much on an external company. I agre...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
oduvan: We can support any github hostings, but in that case we need to move on our side most of github feat...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
AndriusMk: I can see two problems here: 1: a line is not a triangle(stated in the task: degenerate triangle). 2...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
miklasiu: ahhhh zip_longest... :) This is the one I was looking for. Thanks for using it :-D.
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: ...because if you place it in "Puzzle", it will look lame compared to mine. ;-P Seriously, it could ...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
nickie: I think you're misinterpreting the task description (I'm not blaming you, as it's not particularly w...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: count\_diff is very nonclear IMO. :-P Much simpler would be to do what the name says, instead of com...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
bukebuer: Thank you. Once seen [555,545] I knew the what the reason is.
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
Lijantropique: Yep, that would help a lot... I am familiar with "asin" function but I spent a lot of time looking f...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
nVitius: Oh, okay. I'll keep that in mind. Thanks for the tip.
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
htamas: Perhaps because I didn't go for character count? :) But since you asked for it, [I've beaten you by ...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
nickie: As you notice, for even-length lists there are two independent calls to select from checkio. This wa...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
AndriusMk: Curious question. The answer is inside a profile of each person :} Most of us put there some info ab...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
AndriusMk: Create your own then!
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
ilumin: any([ch.isupper() for ch in data]) and use Regex is better store rules in list and check it within l...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: > Hm? I don't get the idea of testing your library. Either you know it works (in which case you don'...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
Alf_: it should be a new trend for CheckiO. Let's everybody post this solution on your native language
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
cbrunet: I agree they are not the best variable names. However, in scientific context, I tend to follow the m...
|
Nov. 23, 2017, 1:38 p.m. |
+ 1 |
for Comment
veky: pbs is reused (you'll remember it from feeding pigeons, and I'll use it at least one more time again...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: LOL. I am Veky and I am a Python golfer. Yes, it is as oxymoronic as it sounds. :-D
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: Realizing the problem is the first step towards solution. ;-)
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: > I know, but it will be redunant operations OMG. Now we're talking about milliseconds. I really don...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: > It's just for first empty run without data. I know, I'm just telling you it's not needed. :-) Look...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
mquintus: I didn't know "hypot()" yet, nice one! Shouldn't you have used good_cells as a global variable? The ...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: Essentially the same as mine. round without second argument rounds to int, so you don't need ,0 (if ...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: Solved them. Thanks for interesting tasks. I tried to be nice and write readable code, but the last ...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
profuel_39643665ff7744e3bff926: 1st of all, replace other then1st if by elif, this will simplify reading & debugging. 2nd, I used re...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
SoonerBourne: Yes, I didn't understand the error code screen. I solved this problem and moved on once I understood...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
nickie: Well done. Check the other solutions, you'll find some based on topological sorting (like that of [h...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
oduvan: Category is not only about "what criteria meets my solution?" but also "How do I want community to j...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
Cjkjvfnby: I like splitting to categories. It help to review code. If you don't know how to categorize you solu...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
oduvan: Спалился :)
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
Cjkjvfnby: Did you have spoiler tag?
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
Cjkjvfnby: **S**, **V** are bad variable names for python. IMHO reuse **width** and **height** variable as radi...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: Well, I don't know how many tickets are (un)lucky. But I'm still trying to see what your solution do...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: You don't know a thing about lazy. Check mine. ;-)
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: omg. My eyes hurt. I know people tell me my solutions are hard to read, but at least they are short....
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
pyos_c5874a6bf94549e5b7bf2a696: In case it's not clear how I ended up with those formulas, [here's the photo](http://i.imgur.com/YXS...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
PositronicLlama: > #Your code here > #You can import some modules or create additional functions You should delete th...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: Way too complicated. Use complex numbers. ;-)
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: Yes, I try to golf a bit here, when the task is really simple. I know it can be hard to read per lin...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: This is complexity, not pure math. :-) But yeah, I was getting nervous for having to escape to float...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
pyos_c5874a6bf94549e5b7bf2a696: Ok, now I'm pretty sure I've done everything right, and "windows-downsiw" seems to have more than on...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
pyos_c5874a6bf94549e5b7bf2a696: Oh, sorry, I thought 0 was a stack, too. My mistake.
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: It is used twice, but since it is a method and is used on two different objects, rebinding is probab...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: Very detailed and documented. Practically every step is separate. See my solution for a diametricall...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
vkolev: I'm sorry for double-posting but came up with the idea to disable the gradient background in div.hea...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
oduvan: Sorry. About what buttons are we talking about? Thank you.
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
SoonerBourne: Nope, but now that I understand what that output is telling me I think I can figure it out. Thank yo...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
AndriusMk: I like the idea of comparing two solutions. As for "requirement of ranking two solutions before you ...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
profuel_39643665ff7744e3bff926: you're expecting only specific order of digits-small-big letters please read about **replace** with ...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
tihenko: Thanks for fixing of this one. Hopefully, there was some mistake, and I am not "Mad March hare". :) ...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
oduvan: > Lists are supposed to be changed - that's what they are for. May be. You never expect that functio...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
oduvan: Sorry. I mean changing function input data
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
mquintus: For "extra spaces" my favourite would be: def checkio(data): return " ".join(data.split())
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
Kolka: [Extra spaces](http://www.checkio.org/mission/task/sentence-with-extra-spaces/) With regexp: import ...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
HonzaKral: any([ch.isupper() for ch in data]) and Using the any builtin is nice, but why stop there and code th...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
Vachenzo: I like finding ways to insert astrophysics into everyday conversation. :D
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
Cjkjvfnby: you always use index from enumerate as **row + 1**
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: Thanks. Though... It always puzzles me when people obviously like my solution, but don't give it thu...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
veky: Actually, they are links to _all_ published solutions by me of that task.
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
Cjkjvfnby: Return **None, None** is good idea. **enumerate** has start argument. I don't sure that docstrings a...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
kvas: This sounds like an interesting idea. It seems though that it would create a quite a bit of support ...
|
Nov. 23, 2017, 1:37 p.m. |
+ 1 |
for Comment
sleepyone: I don't see how elif is useful in this context. Also, the "redundant assignments" are artifacts of w...
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
nickie: Well, you're obviously right. And I obviously haven't coded enough in Python... :-)
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
nickie: Right. I tend to use spaces when the formula looks too complicated otherwise. I changed the names to...
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
nickie: This solution simply takes all combinations of three points. In case they are colinear, it checks to...
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
profuel_39643665ff7744e3bff926: my solution of 15 years old, contains full recombination. As a notice, read about Polish notation. I...
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
veky: We already know htamas routinely writes 10liners without trying to run them through Python, but writ...
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
veky: The most original is the last line. ;-D
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
pyos_c5874a6bf94549e5b7bf2a696: Also, not sure if you've noticed, but the descriptions of the last two assertions are invalid.
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
kvas: Cool idea! However: 392039 -> ((3 + 9) * ((2 / (0 - 3)) + 9)) = 100 We probably need some more tests...
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
kvas: This looks right. Congratulations! If you want to speed it up, you could probably get rid of eval an...
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
veky: It would be really neat if checkio would receive just two arguments (not wrapped in a list). Then th...
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
profuel_39643665ff7744e3bff926: Looks correct, except 'assignment is one = symbol' a = b I'd write: if(isLower ==False): isLower =st...
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
tetedemerou: I agree. But what about showing the tips only after a certain number of unsuccessful tries?
|