Jan. 25, 2015, 2:35 p.m. |
+ 1 |
for Comment
veky: I have no idea whether you're wrong. And that's the problem. This whole category business is complet...
|
Jan. 25, 2015, 5:32 a.m. |
+ 1 |
for Comment
Sim0000: In line 11, width_NS -> width_WE.
|
Jan. 25, 2015, 5:32 a.m. |
+ 1 |
for Comment
Sim0000: The function has three parameters. First and second parameters always have the same length. However,...
|
Jan. 24, 2015, 1:40 p.m. |
+ 2 |
for
First-suic
|
Jan. 24, 2015, 1:40 p.m. |
+ 1 |
for Comment
suic: Hi, you could clean it up a bit. E. g.: 1. Remove the print statements 2. int(a, 10) == int(a) so yo...
|
Jan. 24, 2015, 1:39 p.m. |
+ 1 |
for Comment
suic: Hi, because _list.append_ updates the list and returns _None_ __not the updated list__. # You should...
|
Jan. 24, 2015, 1:39 p.m. |
+ 1 |
for Comment
suic: Hi, because you should __return__ the output and __not print__ it.
|
Jan. 24, 2015, 10:18 a.m. |
+ 1 |
for Comment
veky: https://www.google.hr/webhp?#newwindow=1&q=%22from+fractions+import+Fraction+as+F%22+site:python.org...
|
Jan. 23, 2015, 6:43 a.m. |
+ 1 |
for Comment
Sim0000: This is elementary mission idea. Given a sentence, check whether the sentence is pangram. Pangram is...
|
Jan. 23, 2015, 5:40 a.m. |
+ 1 |
for Comment
suic: Hi, two things: 1. Your function has to __return__ the result and __not print__ it. That's main reas...
|
Jan. 22, 2015, 11:03 a.m. |
+ 1 |
for Comment
suic: Thanks for sharing this. > Unfortunately, these pages are about FSharp Let me ask: Why unfortunately...
|
Jan. 22, 2015, 11:03 a.m. |
+ 1 |
for Comment
suic: Sorry, there was a little bit of sarcasm in my question :) When you're familiar with .NET F# is an o...
|
Jan. 22, 2015, 11:03 a.m. |
+ 1 |
for Comment
hanpari: Dont take me wrong. I like fsharp, it seems to me like great language. "Unfortunatelly" just because...
|
Jan. 22, 2015, 11:03 a.m. |
+ 1 |
for Post
Functional programming
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Post
Algorithms for tasks
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
chhyx2008: But, sets do not support indexing.
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
Cjkjvfnby: For one side it is clear and readable but for other is so uneducative for it algorithmic complexity....
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
Lijantropique: Nothing special, just an alternative way of doing the same thing.
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
maurice.makaay: It is not the same thing (which is logical, otherwise the Python team would not have created two fun...
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
Lijantropique: I didn't said permutations were the same as product, I said product can be used when you are dealing...
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
maurice.makaay: Oh yes, if you were only talking about the two for loops, then you're correct. My apologies. I was l...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
Lijantropique: You're absolutely right. With the “if”, the product is not the best option but the permutations.
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
odwl: By sorting words by len, you can have just a triangle matrix path By sorting lexical order, you can ...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
kamikaze: my is cleaner :))
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
kamikaze: "Clear" != "Speedy" categories :)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
sandarovich: Thank you for publication. endswith - is proper solution in this case. But as for me "if statement" ...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
Cjkjvfnby: **If** will be much shorter if you reverse all worlds and remove duplicates before loops:)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
jollyca: Isn't it faster if you make the double-loop over the set sorted in the descended order of the length...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
RyanAlexander: I learn a better/more efficient way from almost every one of your solutions. Thanks for publishing t...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
zver1zver2: very good code
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
masero: Hi, as endswith() accepts tuples, isn't better to write for w in words: if w.endswith(tuple(x for x ...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
Blukano: This is a nice solution - I didn't know about endswith, so my solution was a bit more complex. Also,...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
cle99y: a set can include identical data, try it :)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
pynur: why you use "w1.endswith(w2) or w2.endswith(w1)"? You think it's be faster then we use only 'w1.ends...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
viktor.pecheniuk: cool:)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
netgamer: First time did i see this function (endswith)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
pbeesley: I got hung up on the indentation of the "return False". Why doesn't the indented "return false" over...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
andreylarionov: Cool! But, I think that OR condition is not needed: if w1 != w2 and w1.endswith(w2): return True Cor...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
hendrikrichard.scholten_e44275: Nice solution short and easy
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
marshall.zheng: good and clear
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
cle99y: better than slicing (DOH !)
|
Jan. 21, 2015, 8:18 a.m. |
+ 1 |
for Comment
suic: Paste you code as code :)
|
Jan. 21, 2015, 8:18 a.m. |
+ 1 |
for Comment
suic: Hi, there are a few issues 1. return True or False always returns True 2. Line 7 is overindented and...
|
Jan. 21, 2015, 8:18 a.m. |
+ 1 |
for Comment
suic: Hi, the problem is the you don't return True (or False) i. e. __bool__ but "True" and "False" i. e. ...
|
Jan. 20, 2015, 5:20 a.m. |
+ 1 |
for Comment
bukebuer: Well, based on my experience, the key is to find out which ring to break when some rings has same hi...
|
Jan. 20, 2015, 5:19 a.m. |
+ 1 |
for Comment
DiZ: You have to check if __N__ is inside the array. Don't put a condition on array length.
|
Jan. 20, 2015, 5:19 a.m. |
+ 1 |
for Comment
Sim0000: Line 9 is no meaning.
|
Jan. 20, 2015, 5:18 a.m. |
+ 1 |
for Comment
DiZ: was a way to say , ie. word[i], because you need to work on indexes, not on list elements. * Why _if...
|
Jan. 20, 2015, 5:18 a.m. |
+ 1 |
for Comment
DiZ: You checked if len(array) >= 3 - good point. But you need to do this - _and_ to exit your function -...
|
Jan. 20, 2015, 5:03 a.m. |
+ 1 |
for Comment
Sim0000: In line 7, x[len(x) / 2 -> x[len(x) // 2.
|
Jan. 16, 2015, 10:07 a.m. |
+ 1 |
for Comment
Sim0000: Your code always return False, because line 10-11 are in for loop. You need to move _return False_ t...
|
Jan. 16, 2015, 10:07 a.m. |
+ 1 |
for Comment
Sim0000: See [Format String Syntax](https://docs.python.org/3.3/library/string.html#format-string-syntax). de...
|
Jan. 15, 2015, 5:59 p.m. |
+ 1 |
for Comment
DiZ: You're right, it would be better but mission creator decided to use a list, that's all.
|
Jan. 15, 2015, 5:59 p.m. |
+ 1 |
for Comment
bukebuer: It should be sumList.append(array[a]) rather than sumList.append(a) The latter one only calculates t...
|
Jan. 15, 2015, 5:59 p.m. |
+ 1 |
for Comment
OMFGNuts: Yeah, kinda wrong. You actually don't need any other libraries(math) other than built-in. Also, plea...
|
Jan. 15, 2015, 5:59 p.m. |
+ 1 |
for Comment
DiZ: Maybe you can look at your previous thread when someone already replied to your question... http://w...
|
Jan. 13, 2015, 5:28 a.m. |
+ 1 |
for Comment
Sim0000: You can do like followings. def f(*args): n = len(args) # n is the number of arguments # any code
|
Jan. 12, 2015, 8:16 p.m. |
+ 1 |
for Post
CheckIO and Job Search
|
Jan. 7, 2015, 6:09 p.m. |
+ 5 |
for
filter-veky
|
Jan. 7, 2015, 6:07 p.m. |
+ 1 |
for Comment
veky: I appreciate your comment, though probably it will be moderated because of some inappropriate words....
|
Jan. 5, 2015, 5:26 p.m. |
+ 1 |
for Comment
suic: Hi, there are at least two issues: 1. Your code has to be __in__ _checkio_ function as it is called ...
|
Jan. 3, 2015, 12:21 p.m. |
+ 1 |
for Comment
veky: text is really not defined. :-) It is a parameter of find_message, but that means it exists only in ...
|
Jan. 2, 2015, 6:19 a.m. |
+ 1 |
for Comment
sliziky: I figured it out- if j==k: continue if k.endswith(j) or j.endswith(k): return True return False
|
Jan. 2, 2015, 6:19 a.m. |
+ 1 |
for Comment
suic: You have to _return_ the result and not print.
|
Jan. 2, 2015, 6:19 a.m. |
+ 1 |
for Comment
suic: 1. You have to _return_ the result. Your function is currently return None. 2. array[len(array)] thr...
|
Dec. 31, 2014, 10:18 a.m. |
+ 1 |
for
First-ciel
|
Dec. 31, 2014, 10:18 a.m. |
+ 3 |
for
First-Sim0000
|
Dec. 31, 2014, 5:19 a.m. |
+ 1 |
for Comment
PriyankaGandhi: I solved it ..added the condition i.isalpha() Thanks.
|
Dec. 31, 2014, 5:19 a.m. |
+ 1 |
for Comment
bukebuer: def index_power(array, n): if n == 0: return 1 elif n >= len(array): return -1 else: return array[n]...
|
Dec. 25, 2014, 5:09 a.m. |
+ 1 |
for Comment
DiZ: Because hour hand moves along with minute hand. Look at _your_ code in line 8: angle=abs(360.0/12.0 ...
|
Dec. 25, 2014, 5:09 a.m. |
+ 1 |
for Comment
DiZ: In one hour, hour hand travels 360/12 = 30°. In one minute, hour hand travels 360/12/60 = 0.5° but m...
|
Dec. 15, 2014, 11:15 p.m. |
+ 1 |
for Post
Greeting 2
|
Dec. 15, 2014, 11:09 p.m. |
+ 2 |
for
Run Length with itertools-gyahun_dash
|
Dec. 15, 2014, 11:07 p.m. |
+ 1 |
for Comment
gyahun_dash: ### Example: ((0, 0, 1, 0, 0), (0, 1, 1, 1, 0), (1, 1, 1, 1, 1), (0, 1, 1, 1, 0), (0, 0, 1, 0, 0)) F...
|
Dec. 15, 2014, 8:03 a.m. |
+ 1 |
for Comment
DiZ: _Friends (({"a", "b"}, {"b", "c"}, {"c", "a"}, {"a", "c"})_ and _Friends ([{"1", "2"}, {"3", "1"}])_...
|
Dec. 15, 2014, 3:37 a.m. |
+ 1 |
for
First-ceu9jo
|
Dec. 15, 2014, 3:37 a.m. |
+ 1 |
for
First 0.01-fantakeshi
|
Dec. 15, 2014, 3:37 a.m. |
+ 2 |
for
First for Python3-fantakeshi
|
Dec. 15, 2014, 3:37 a.m. |
+ 1 |
for
Run Length-gyahun_dash
|
Dec. 15, 2014, 3:34 a.m. |
+ 1 |
for Comment
gyahun_dash: length = max(map(len, strings)) if strings else 0 In Python 3.4, we can write: length = max(map(len,...
|
Dec. 15, 2014, 3:30 a.m. |
+ 3 |
for
namedtuple DP-gyahun_dash
|
Dec. 15, 2014, 3:30 a.m. |
+ 2 |
for
First-Sim0000
|
Dec. 13, 2014, 6:39 a.m. |
+ 1 |
for Comment
Eldin: I don't know if I really forgot that or you're just magic, but thanks :D
|
Dec. 12, 2014, 11:51 a.m. |
+ 1 |
for Comment
Cjkjvfnby: > I prefer OPs solution as it is a bit more readable. Can you give a link?
|
Dec. 11, 2014, 12:54 a.m. |
+ 1 |
for
First-ciel
|
Dec. 11, 2014, 12:54 a.m. |
+ 3 |
for
First-ciel
|
Dec. 11, 2014, 12:54 a.m. |
+ 2 |
for
First-gyahun_dash
|
Dec. 11, 2014, 12:53 a.m. |
+ 2 |
for
DP itertools-gyahun_dash
|
Dec. 10, 2014, 6:07 a.m. |
+ 1 |
for Comment
veky: And if you listen to Zed Shaw, be prepared that I always answer his pointless challenge > "When all ...
|
Dec. 9, 2014, 11:32 p.m. |
+ 1 |
for
CheckiO's Top Japan Programmer Competition is On!
|
Dec. 5, 2014, 7:46 a.m. |
+ 1 |
for
T T T-tonysal44
|
Dec. 5, 2014, 7:46 a.m. |
+ 3 |
for
Second-andrew.daniel.walsh
|
Dec. 5, 2014, 7:45 a.m. |
+ 1 |
for
Second-MathWay
|
Dec. 2, 2014, 8:26 a.m. |
+ 1 |
for Comment
Eldin: On line 16 (and 21, 29, 34, 43 and 48) you're making a variable assignment (setting count1 to 0) ins...
|
Dec. 2, 2014, 8:16 a.m. |
+ 1 |
for Comment
NerdAlert1101: My bad, I didn't iterate a range, I was instead iterating over the array elements themselves. Once t...
|
Dec. 2, 2014, 5:34 a.m. |
+ 1 |
for Comment
P1O1E: Got it sorted - changed my approach!
|
Nov. 30, 2014, 5:56 a.m. |
+ 1 |
for Post
Typo in description
|
Nov. 30, 2014, 5:54 a.m. |
+ 1 |
for Comment
chrismartin: The instructions read "If N is outside the array, then return -1". As a simple way to deal with this...
|
Nov. 30, 2014, 5:54 a.m. |
+ 1 |
for Comment
DillonKo: Well, I does help a little but I tried that idea and I'm still missing something. I hate not knowing...
|
Nov. 30, 2014, 5:54 a.m. |
+ 1 |
for Comment
DillonKo: I Understand what you mean but I am still getting the same error. I agree 100%. It just doesn't seem...
|