Sept. 20, 2019, 11:28 a.m. |
+ 1 |
for Comment
d_rabenko: thank you for your advise!
|
June 12, 2019, 7:38 a.m. |
+ 1 |
for Comment
karpelevich: In 1 line: def worth_of_words(words): return max(words, key=lambda word: sum(VALUES[c] for c in word...
|
April 20, 2019, 10:27 a.m. |
+ 1 |
for Comment
Vasily__Chibilyaev: Very smart. This piece '(i.endswith(j) or j.endswith(i))' does make sense.
|
April 20, 2019, 10:27 a.m. |
+ 1 |
for Comment
alabama_09: This is a very simple and working solution. And there is a marvelous 'endwith()' double condition fo...
|
Feb. 7, 2019, 2:43 a.m. |
+ 1 |
for Comment
robert.theriault: That's fair, I probably misread the exact requirements. I remember reading it a few times and wonder...
|
Jan. 24, 2019, 5:47 p.m. |
+ 1 |
for Comment
oduvan: Change the category
|
Jan. 22, 2019, 5:15 p.m. |
+ 1 |
for Comment
Phil15: It was intentional to not talk about Rookie class. But it was an error, given the number of messages...
|
Jan. 22, 2019, 3:26 p.m. |
+ 1 |
for Comment
vmiimu: Thank you all for your advice. I will also be more careful about the feedback tag in future. I have ...
|
Jan. 22, 2019, 3:12 p.m. |
+ 1 |
for Comment
Phil15: It's not feedback but advice you want. Found in github repository: class Rookie(Warrior): def __init...
|
Jan. 21, 2019, 2:19 p.m. |
+ 1 |
for Comment
oduvan: you don't need `else`
|
Jan. 21, 2019, 2:19 p.m. |
+ 1 |
for Comment
oduvan: sorry, I was late with updating mission description. Now preconception says that both strings have t...
|
Jan. 21, 2019, 2:11 a.m. |
+ 1 |
for Comment
fed.kz: You're right. I can fix it if I'll add one condition. `if len(str1) != len(str2): return False`
|
Jan. 20, 2019, 4 p.m. |
+ 1 |
for Comment
ssk8: you are absolutely right. if the tests include this, it will fail. My code doesn't look for this cas...
|
Jan. 20, 2019, 3:08 p.m. |
+ 1 |
for Comment
kodix09: true, I assumed that strings are of the same length
|
Jan. 18, 2019, 6:02 a.m. |
+ 1 |
for Comment
fed.kz: Do the strings have the same length? On example, my solution gives next result isometric_strings('',...
|
Dec. 29, 2018, 2:51 p.m. |
+ 1 |
for Comment
Oleg_Domokeev: The solution is not, may be, the shortest. But it is very clear and readable. The idea to use nested...
|
Dec. 26, 2018, 9:45 a.m. |
+ 1 |
for Comment
veky: Of course. When I wrote the above comment, I didn't know about the preset code. :-)
|
Aug. 5, 2018, 2:49 p.m. |
+ 1 |
for Comment
Riddick: Hm, looked like you're right. I just try to check your solution with big data input and solution wit...
|
Aug. 4, 2018, 5:41 a.m. |
+ 1 |
for Comment
Riddick: I think this solution should be in uncategorized solutions. Firstly, you may use from collections im...
|
July 31, 2018, 2:33 p.m. |
+ 1 |
for Comment
Marlen_Nurmakov: When I run the code I get > IndexError: list index out of range > best_country, 13 > , 17 Of course,...
|
July 29, 2018, 3:20 a.m. |
+ 1 |
for Comment
Slowicide: Just add else statement, where you will add whitespace into your result list. Then return "".join(cr...
|
July 29, 2018, 3:19 a.m. |
+ 1 |
for Comment
tigerhu3180: Try > text[text.index(symbol)+1:].index(symbol)
|
July 29, 2018, 3:17 a.m. |
+ 1 |
for Comment
Tinus_Trotyl: Oooopppsss. . . . you're absolutely right. . . so, . . that has to be ` 0 <= n < len(list)` .
|
July 29, 2018, 3:17 a.m. |
+ 1 |
for Comment
tigerhu3180: Hello? What you have to do: n>= len(list) ---> return -1 OK? or you will get a error.
|
July 29, 2018, 3:16 a.m. |
+ 1 |
for Comment
Cody9999: Thank you. I was wrong. Pythagoras needs a right angle and shape matters here.
|
July 28, 2018, 7:06 a.m. |
+ 1 |
for Comment
Cody9999: I appreciate your help. Lines 12-13 or 30-34 just check simple Pythagoras: a square + b square EQUAL...
|
July 26, 2018, 2:23 p.m. |
+ 1 |
for Comment
Sim0000: One way to fix your code is append sentinel to text. After line 6, **text += "/"**, above code works...
|
July 26, 2018, 1:04 p.m. |
+ 1 |
for Comment
kurosawa4434: Hi flipster23. Your idea is correct. And you were so close. I tried fixing your code: def checkio(ma...
|
July 26, 2018, 12:55 p.m. |
+ 1 |
for Comment
Sim0000: Why do you compare only best case? I try to measure time consumption. Below is my code. import timei...
|
July 26, 2018, 12:54 p.m. |
+ 1 |
for Comment
Tinus_Trotyl: Hi, An example: `index_power([1, 2, 3, 4], 2)` `list` now becomes `[1, 2, 3, 4]` and `n` will be `2`...
|
July 26, 2018, 12:54 p.m. |
+ 1 |
for Comment
Sillte: I tried your code. At **2nd example**, if you check the shape of **indices** and **labeled**, then y...
|
July 26, 2018, 12:52 p.m. |
+ 1 |
for Comment
sinclair2k: Hi! Look carefully, where the 'return a*b' statement is. And check a right place for 'b=array(c)' ex...
|
July 26, 2018, 12:52 p.m. |
+ 1 |
for Comment
sinclair2k: You have to make out python string formatting methods. Try to read [this article](https://realpython...
|
July 26, 2018, 12:52 p.m. |
+ 1 |
for Comment
Sim0000: It is very close to the correct answer. See [document](https://docs.python.org/3/whatsnew/3.6.html#w...
|
July 26, 2018, 5:07 a.m. |
+ 1 |
for Comment
PatinaHo: It worked, thank you! I always wondered how object attributes should be declared in Python, now I re...
|
July 23, 2018, 3 a.m. |
+ 1 |
for Comment
Cjkjvfnby: Not so simple as should be. Your lambda can be simplified.
|
July 20, 2018, 3:49 p.m. |
+ 1 |
for Comment
kurosawa4434: Hi Sokil. The variable 'args' is the tuple of input values. checkio(1, 2, 3) -> args == (1, 2, 3)
|
July 20, 2018, 7:55 a.m. |
+ 1 |
for Comment
robspassky: I did some quick tests on python3.5.2 with timeit and len(list(g)) is actually faster than sum(1 for...
|
July 19, 2018, 10:56 p.m. |
+ 1 |
for Comment
McTpaxep: https://py.checkio.org/forum/post/3268/supported-modules-for-python-36/ recently found it. All avail...
|
July 15, 2018, 6:52 a.m. |
+ 1 |
for Comment
Sim0000: I recommend Elementary first. Good luck :-)
|
May 15, 2018, 7:40 p.m. |
+ 1 |
for Comment
ArchTauruS: Why not have a try with datetime module ?
|
April 26, 2018, 3 p.m. |
+ 1 |
for Comment
Nagyunagi: I see. Is it unnecessary to learn regular expression for a while?
|
April 26, 2018, 2:45 p.m. |
+ 1 |
for Comment
Nagyunagi: Thanks for the review! May be it's about time to learn regular expression.
|
April 25, 2018, 9:35 a.m. |
+ 1 |
for Comment
veky: I solved it without using any of these (well, I used for, but only in a comprehension. It can easily...
|
April 25, 2018, 6:04 a.m. |
+ 1 |
for Comment
veky: The mission would be _a lot_ more interesting without that silly bound on input size. ;-)
|
April 23, 2018, 2:01 a.m. |
+ 1 |
for Comment
veky: [Here it is.](https://py.checkio.org/mission/worth-of-words/publications/veky/python-3/vars/) I do h...
|
April 22, 2018, 2:23 p.m. |
+ 1 |
for Comment
veky: I agree. However, that is just (input-invariant) data. As you say, it's now in the preset code anywa...
|
April 22, 2018, 1:15 p.m. |
+ 1 |
for Comment
Nagyunagi: Thank you! Thanks to nakanohito_piyo for this solution!
|
April 22, 2018, 12:55 p.m. |
+ 1 |
for Comment
veky: How about it? :-) Or more precisely, why? What do you consider creative here?
|
April 22, 2018, 12:40 p.m. |
+ 1 |
for Comment
veky: Namespace dicts are usually initialized via kwargs. dict(e=1, a=1, i=1, ...) [Of course, you might a...
|
Sept. 28, 2017, 11:08 a.m. |
+ 1 |
for Comment
DahliaSR: > Output: The common words **as a string** A list won't do it. Also keep in mind that you have to **...
|
Sept. 22, 2017, 8:35 a.m. |
+ 1 |
for Comment
DahliaSR: Your solution fails because you forgot to take care of case sensitivity!
|
Sept. 21, 2017, 8:34 a.m. |
+ 1 |
for Comment
Tinus_Trotyl: Try to replace your <**print(“blablablah”)**> by <**return “blablablah”**> . The most usual structur...
|
Sept. 19, 2017, 6:37 a.m. |
+ 1 |
for Comment
Tinus_Trotyl: As you're defined a function, you need to <**return**> your result instead of printing it.
|
Sept. 19, 2017, 6:37 a.m. |
+ 1 |
for Comment
Tinus_Trotyl: Hi, Since "**H**ow" in <**text**> has a capital "**H**" and "**h**ow" in <**words**> is lower cased,...
|
Sept. 17, 2017, 5:19 p.m. |
+ 1 |
for Comment
DahliaSR: MARKED AS RESOLVED - USER SOLVED TASK
|
Sept. 14, 2017, 7:30 p.m. |
+ 1 |
for Comment
Sim0000: add code tag. You need **return False** after line 6. Your function name must be **checkio**.
|
Sept. 14, 2017, 7:29 p.m. |
+ 1 |
for Comment
dimka59ru: 1024000000 / 1024 ** 2 == 976.5625 !!!!!!!!!!! =)))
|
Sept. 14, 2017, 7:29 p.m. |
+ 1 |
for Comment
Sim0000: Since 1000000000 = 976.5625 * 1024 ** 2, the answer is 976M. In line 29 and 31, you must use **/= ba...
|
Sept. 14, 2017, 7:29 p.m. |
+ 1 |
for Comment
aquazul: it is equivalent to "i[0] must be in **both father-set and son-set**". you have to reconsider the co...
|
Sept. 14, 2017, 7:27 p.m. |
+ 1 |
for Comment
DahliaSR: Read the task description more carefully: > Here you should find the length of the longest substring...
|
Sept. 14, 2017, 7:27 p.m. |
+ 1 |
for Comment
DahliaSR: Yes, it is the proper behavior. The [_map()_-function](https://docs.python.org/3/library/functions.h...
|
Sept. 14, 2017, 7:27 p.m. |
+ 1 |
for Comment
Sim0000: Do not print your result, return it. CheckiO system judge your return value.
|
Sept. 14, 2017, 7:27 p.m. |
+ 1 |
for Comment
Sim0000: I try your code. I found some bugs. 1. In line 27, you need to use **>=** instead **>**. When n_list...
|
Sept. 13, 2017, 5:14 a.m. |
+ 1 |
for Comment
DiZ: Maybe a bit of explanation then: - First line: declarations and suits/values in descending order - S...
|
Sept. 12, 2017, 10:58 a.m. |
+ 1 |
for Comment
oduvan: It is a bug, thanks, we will this it
|
Sept. 12, 2017, 3:11 a.m. |
+ 1 |
for Comment
ChocolateDisco: thanks niBBa you safed my life
|
Sept. 9, 2017, 4:49 a.m. |
+ 1 |
for Comment
aquazul: Read description once more: > If you have two or more letters with the same frequency, then return t...
|
Sept. 8, 2017, 4:35 p.m. |
+ 1 |
for Comment
andryzinchuk: Ty sir, I am passed ^_^
|
Sept. 7, 2017, 4:27 p.m. |
+ 1 |
for Comment
colinmcnicholl: I followed your suggestion and got a solution. Many Thanks.
|
Sept. 7, 2017, 1:53 p.m. |
+ 1 |
for Comment
wanglong1996: thanks much, I solved it.
|
Sept. 7, 2017, 4:44 a.m. |
+ 1 |
for Comment
vinc: 1) First of all, you've got a lot of unnecessary code. I've commented on some lines, just think abou...
|
Sept. 7, 2017, 4:07 a.m. |
+ 1 |
for Comment
veky: You thank me for responding, but it seems you haven't read what I've written. Just one more time: ca...
|
Aug. 25, 2017, 8:18 a.m. |
+ 1 |
for Comment
El-Kurto: Starting with the longest strings first is a good idea. I didn't do it that way, but I should have.
|
Aug. 24, 2017, 12:56 p.m. |
+ 1 |
for Comment
Allamande: Awesomely short. How is the processing speed of such list comprehensions in production-ready python ...
|
Aug. 24, 2017, 12:56 p.m. |
+ 1 |
for Comment
rodrigo.cetera: It looks like square N
|
Nov. 24, 2015, 7:02 a.m. |
+ 1 |
for Comment
Infini7y: Im wondering if instead of for i in range... for i,e in enumerate(numbers[2:],2): score[i] = max(sco...
|