-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path11.rss
432 lines (411 loc) · 32.5 KB
/
11.rss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:discourse="http://www.discourse.org/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>אתגר - פייתון בעברית ובחינם</title>
<link>https://forums.pythonic.guru/c/challenge/11</link>
<description>נושאים בקטגוריה ‚אתגר’ כאן נפרסם שאלות נוספות ושאלות אתגר למי שמעוניין להעמיק בחומר ולתרגל שאלות נוספות.</description>
<language>he</language>
<lastBuildDate>Tue, 20 Oct 2020 19:37:52 +0000</lastBuildDate>
<atom:link href="https://forums.pythonic.guru/c/challenge/11.rss" rel="self" type="application/rss+xml" />
<item>
<title>אתגר: הפונקציה flatten</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>נסו לכתוב פונקציה קצרה בשם <code>flatten</code> שמקבלת רשימה בעומק בלתי מוגבל, ומחזירה רשימה שטוחה.</p>
<p>לדוגמה:</p>
<blockquote>
<p>עבור: <code>[[[1, 2], [3, 4]], [5, 6], 7]</code> יוחזר: <code>[1, 2, 3, 4, 5, 6, 7]</code>.<br>
עבור: <code>[[]]</code> יוחזר: <code>[]</code>.</p>
</blockquote>
<p>בונוס למי שמצליח לכתוב 2 פונקציות: אחת רקורסיבית והשנייה לא רקורסיבית.</p>
<p><small>7 פוסטים - 6 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/flatten/8364">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/flatten/8364</link>
<pubDate>Tue, 20 Oct 2020 19:37:52 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-8364</guid>
<source url="https://forums.pythonic.guru/t/flatten/8364.rss">אתגר: הפונקציה flatten</source>
</item>
<item>
<title>Advent of Code 2019 🤯 (יום 8)</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>בהצלחה <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"><br>
<a href="https://adventofcode.com/2019/day/8">יום 8</a></p>
<p><small>4 פוסטים - 4 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/advent-of-code-2019-8/7379">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/advent-of-code-2019-8/7379</link>
<pubDate>Sun, 28 Jun 2020 20:15:15 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-7379</guid>
<source url="https://forums.pythonic.guru/t/advent-of-code-2019-8/7379.rss">Advent of Code 2019 🤯 (יום 8)</source>
</item>
<item>
<title>Advent of Code 2019 🤯 (יום 7)</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>בהצלחה <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"><br>
<a href="https://adventofcode.com/2019/day/7">יום 7</a></p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forums.pythonic.guru/uploads/default/original/2X/4/4636aa40ba6c4f5a1e13e1bed8786a5a9bc8622a.jpeg" data-download-href="https://forums.pythonic.guru/uploads/default/4636aa40ba6c4f5a1e13e1bed8786a5a9bc8622a" title="image"><img src="https://forums.pythonic.guru/uploads/default/optimized/2X/4/4636aa40ba6c4f5a1e13e1bed8786a5a9bc8622a_2_690x444.jpeg" alt="image" data-base62-sha1="a18xCs2VblOXEY2cXdMxSec7wsq" width="690" height="444" srcset="https://forums.pythonic.guru/uploads/default/optimized/2X/4/4636aa40ba6c4f5a1e13e1bed8786a5a9bc8622a_2_690x444.jpeg, https://forums.pythonic.guru/uploads/default/optimized/2X/4/4636aa40ba6c4f5a1e13e1bed8786a5a9bc8622a_2_1035x666.jpeg 1.5x, https://forums.pythonic.guru/uploads/default/original/2X/4/4636aa40ba6c4f5a1e13e1bed8786a5a9bc8622a.jpeg 2x" data-small-upload="https://forums.pythonic.guru/uploads/default/optimized/2X/4/4636aa40ba6c4f5a1e13e1bed8786a5a9bc8622a_2_10x10.png"></a></div><p></p>
<p><small>8 פוסטים - 5 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/advent-of-code-2019-7/7148">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/advent-of-code-2019-7/7148</link>
<pubDate>Mon, 15 Jun 2020 02:34:27 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-7148</guid>
<source url="https://forums.pythonic.guru/t/advent-of-code-2019-7/7148.rss">Advent of Code 2019 🤯 (יום 7)</source>
</item>
<item>
<title>Advent of Code 2019 🤯 (יום 6)</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>שרשור <a href="https://forums.pythonic.guru/t/advent-of-code-2019-1/6478">Advent of Code יום 1</a> נחל הצלחה גדולה, וצלחנו גם את ימים <a href="https://forums.pythonic.guru/t/advent-of-code-2019-2/6486">2 </a>, <a href="https://forums.pythonic.guru/t/advent-of-code-2019-3/6644">3</a>, <a href="https://forums.pythonic.guru/t/advent-of-code-2019-4/6895">4</a> ו־<a href="https://forums.pythonic.guru/t/advent-of-code-2019-5/6987">5</a>. בואו נתקדם <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>
<p>אני מניח שהאתגר הזה ישאר פה <strong>לפחות</strong> ליומיים שלושה, אז קחו את הזמן <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"><br>
ואם לא הספקתם לפתור את הימים הקודמים – לא חובה, אבל לכו על זה! אלו תרגילים נחמדים מאוד שישפרו את היכולות שלכם מאוד.</p>
<p>אז קדימה, פרסמו פה את הפתרונות שלכם <a href="https://adventofcode.com/2019/day/6">ליום השישי</a> של Advent of Code!</p>
<p><small>20 פוסטים - 7 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/advent-of-code-2019-6/7068">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/advent-of-code-2019-6/7068</link>
<pubDate>Wed, 10 Jun 2020 01:04:53 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-7068</guid>
<source url="https://forums.pythonic.guru/t/advent-of-code-2019-6/7068.rss">Advent of Code 2019 🤯 (יום 6)</source>
</item>
<item>
<title>Advent of Code 2019 🤯 (יום 5)</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>שרשור <a href="https://forums.pythonic.guru/t/advent-of-code-2019-1/6478">Advent of Code יום 1</a> נחל הצלחה גדולה, וגם ימים <a href="https://forums.pythonic.guru/t/advent-of-code-2019-2/6486">2</a> ו־<a href="https://forums.pythonic.guru/t/advent-of-code-2019-3/6644">3</a> שהיו משמעותית קשוחים מקודמם.<br>
אחרי שנחנו מעט עם <a href="https://forums.pythonic.guru/t/advent-of-code-2019-4/6895">יום 4</a>, מגיע לו יום חדש.</p>
<p>אני מניח שהאתגר הזה ישאר פה <strong>לפחות</strong> ליומיים שלושה, אז קחו את הזמן <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"><br>
ואם לא הספקתם לפתור את הימים הקודמים – לא חובה, אבל לכו על זה! אלו תרגילים נחמדים מאוד שישפרו את היכולות שלכם מאוד.</p>
<p>אז קדימה, פרסמו פה את הפתרונות שלכם <a href="https://adventofcode.com/2019/day/5">ליום החמישי</a> של Advent of Code!</p>
<p><small>11 פוסטים - 8 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/advent-of-code-2019-5/6987">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/advent-of-code-2019-5/6987</link>
<pubDate>Fri, 05 Jun 2020 03:18:12 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-6987</guid>
<source url="https://forums.pythonic.guru/t/advent-of-code-2019-5/6987.rss">Advent of Code 2019 🤯 (יום 5)</source>
</item>
<item>
<title>Advent of Code 2019 🤯 (יום 4)</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>שרשור <a href="https://forums.pythonic.guru/t/advent-of-code-2019-1/6478">Advent of Code יום 1</a> נחל הצלחה גדולה, וגם ימים <a href="https://forums.pythonic.guru/t/advent-of-code-2019-2/6486">2</a> ו־<a href="https://forums.pythonic.guru/t/advent-of-code-2019-3/6644">3</a> שהיו משמעותית קשוחים מקודמם.</p>
<p>אני מניח שהאתגר הזה ישאר פה <strong>לפחות</strong> ליומיים שלושה, אז קחו את הזמן <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"><br>
ואם לא הספקתם לפתור את הימים הקודמים – לא חובה, אבל לכו על זה! אלו תרגילים נחמדים מאוד שישפרו את היכולות שלכם מאוד.</p>
<p>אז קדימה, פרסמו פה את הפתרונות שלכם <a href="https://adventofcode.com/2019/day/4">ליום הרביעי</a> של Advent of Code!</p>
<p><small>13 פוסטים - 10 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/advent-of-code-2019-4/6895">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/advent-of-code-2019-4/6895</link>
<pubDate>Mon, 01 Jun 2020 23:20:19 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-6895</guid>
<source url="https://forums.pythonic.guru/t/advent-of-code-2019-4/6895.rss">Advent of Code 2019 🤯 (יום 4)</source>
</item>
<item>
<title>Advent of Code 2019 🤯 (יום 3)</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>שרשור <a href="https://forums.pythonic.guru/t/advent-of-code-2019-1/6478">Advent of Code יום 1</a> נחל הצלחה גדולה, וגם <a href="https://forums.pythonic.guru/t/advent-of-code-2019-2/6486">Advent of Code יום 2</a> שהיה משמעותית קשוח מקודמו.</p>
<p>אני מניח שהאתגר הזה ישאר פה <strong>לפחות</strong> ליומיים שלושה, אז קחו את הזמן <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"><br>
ואם לא הספקתם לפתור את הימים הקודמים – לא חובה, אבל לכו על זה! אלו תרגילים נחמדים מאוד שישפרו את היכולות שלכם מאוד.</p>
<p>אז קדימה, פרסמו פה את הפתרונות שלכם <a href="https://adventofcode.com/2019/day/3">ליום השלישי</a> של Advent of Code!</p>
<p><small>17 פוסטים - 13 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/advent-of-code-2019-3/6644">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/advent-of-code-2019-3/6644</link>
<pubDate>Tue, 26 May 2020 15:40:36 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-6644</guid>
<source url="https://forums.pythonic.guru/t/advent-of-code-2019-3/6644.rss">Advent of Code 2019 🤯 (יום 3)</source>
</item>
<item>
<title>Advent of Code 2019 🤯 (יום 2)</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>שרשור <a href="https://forums.pythonic.guru/t/advent-of-code-2019-1/6478">Advent of Code יום 1</a> נחל הצלחה גדולה.<br>
הוא היה בדיקת טמפרטורה טובה למים, אבל עכשיו הגיע הזמן להעלות את האנטה ולפתור את יום 2.</p>
<p>אני מניח שהאתגר הזה ישאר פה <strong>לפחות</strong> ליומיים שלושה, אז קחו את הזמן <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"><br>
ואם לא הספקתם לפתור את יום אחד – לא חובה, אבל לכו על זה! זה תרגיל נחמד מאוד.</p>
<p>אז קדימה, פרסמו פה את הפתרונות שלכם <a href="https://adventofcode.com/2019/day/2">ליום השני</a> של Advent of Code!</p>
<p><small>42 פוסטים - 14 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/advent-of-code-2019-2/6486">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/advent-of-code-2019-2/6486</link>
<pubDate>Sat, 23 May 2020 01:54:26 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-6486</guid>
<source url="https://forums.pythonic.guru/t/advent-of-code-2019-2/6486.rss">Advent of Code 2019 🤯 (יום 2)</source>
</item>
<item>
<title>Advent of Code 2019 🤯 (יום 1)</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>הא לכם סיפור מעניין: כל שנה, כחודש לפני ערב השנה האזרחית החדשה (Новый Год, סילבסטר, מה שתרצו), מתפרסם משחק שמתכנתים ברחבי העולם אוהבים מאוד ונקרא Advent of Code.</p>
<h3>הקדמה</h3>
<p>למי שלא מכיר – <code>Advent of ...</code> היא מעין ספירת ייאוש נוצרית עד שמגיעה השנה החדשה. חלק מהנוצרים חוגגים את הסיפור ממש עם <a href="https://he.wikipedia.org/wiki/%D7%9C%D7%95%D7%97_%D7%94%D7%A6%D7%99%D7%A4%D7%99%D7%99%D7%94">לוח שנה של תקופת הציפייה</a> שכולל ספירה של 24 עד 31 ימים לאחור, ובחלק מהלוחות הללו יש חלונות קטנים של מתנות סמליות, שהולכות ונהיות משמעותיות יותר ככל שמועד השנה החדשה מתקרב.<br>
אחד המימושים האהובים עלי, לדוגמה, הוא <a href="https://www.masterofmalt.com/rum/drinks-by-the-dram/rum-advent-calendar/">Rum Advent Calendar</a>, שבו בכל חלון שכזה יש בקבוקון רום. <img src="https://forums.pythonic.guru/images/emoji/twitter/stuck_out_tongue.png?v=9" title=":stuck_out_tongue:" class="emoji" alt=":stuck_out_tongue:"></p>
<h3>יא חופר מה האתגר</h3>
<p>מדובר באתר שלקראת השנה החדשה מפרסם תרגילי קוד חביבים, אחד כל יום, עד השנה החדשה.<br>
חשבתי שיהיה נחמד להתחיל לפתור פה יחד אתכם את האתגרים שהיו בשנה האחרונה. מתוקף הנסיבות ומעצם זה שכולכם עמוסים, נחכה עד שיהיה מספר סביר של פתרונות לאתגר, ואחליט לפי זה מתי עובדים על היום הבא שפורסם ב־Advent of Code.<br>
הבונוס הנחמד – אני אפרסם גם את הפתרון שלי לכל אחד מהתרגילים.</p>
<p>בכל “יום” באתגר יש שני תרגילים – השני נפתח רק אחרי שתפתרו את הראשון. במסגרת האתגר אנחנו נפתור את שניהם.</p>
<p>אז בואו נתחיל!<br>
<a href="https://adventofcode.com/">הירשמו</a> ל־Advent of Code ופרסמו פה את התשובה שלכם <a href="https://adventofcode.com/2019/day/1">לשאלה הראשונה</a>.</p>
<p><small>41 פוסטים - 21 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/advent-of-code-2019-1/6478">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/advent-of-code-2019-1/6478</link>
<pubDate>Fri, 22 May 2020 09:14:37 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-6478</guid>
<source url="https://forums.pythonic.guru/t/advent-of-code-2019-1/6478.rss">Advent of Code 2019 🤯 (יום 1)</source>
</item>
<item>
<title>[חידה] מה האוטומט הבא עושה?</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>מי שלמד אוטומטים ושפות פורמליות במסגרת פורמלית מתבקש לשמור לעצמו את התשובה <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forums.pythonic.guru/uploads/default/original/2X/2/2065c733307703b1645baab8f77881595640f533.png" data-download-href="https://forums.pythonic.guru/uploads/default/2065c733307703b1645baab8f77881595640f533" title="image"><img src="https://forums.pythonic.guru/uploads/default/optimized/2X/2/2065c733307703b1645baab8f77881595640f533_2_462x500.png" alt="image" data-base62-sha1="4CBkW2SeXTetSkmwFZMXsZgjbrR" width="462" height="500" srcset="https://forums.pythonic.guru/uploads/default/optimized/2X/2/2065c733307703b1645baab8f77881595640f533_2_462x500.png, https://forums.pythonic.guru/uploads/default/original/2X/2/2065c733307703b1645baab8f77881595640f533.png 1.5x, https://forums.pythonic.guru/uploads/default/original/2X/2/2065c733307703b1645baab8f77881595640f533.png 2x" data-small-upload="https://forums.pythonic.guru/uploads/default/optimized/2X/2/2065c733307703b1645baab8f77881595640f533_2_10x10.png"></a></div><p></p>
<p><small>33 פוסטים - 9 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/topic/5903">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/topic/5903</link>
<pubDate>Tue, 05 May 2020 13:13:34 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-5903</guid>
<source url="https://forums.pythonic.guru/t/topic/5903.rss">[חידה] מה האוטומט הבא עושה?</source>
</item>
<item>
<title>[אתגר קשה] חידת N המלכות</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<blockquote>
<p><strong>חידת שמונה המלכות</strong> היא <a href="https://he.wikipedia.org/wiki/%D7%97%D7%99%D7%93%D7%AA_%D7%A9%D7%97%D7%9E%D7%98">חידת שחמט</a> שבה יש למקם שמונה <a href="https://he.wikipedia.org/wiki/%D7%9E%D7%9C%D7%9B%D7%94_(%D7%A9%D7%97%D7%9E%D7%98)">מלכות שחמט</a> על <a href="https://he.wikipedia.org/wiki/%D7%9C%D7%95%D7%97_%D7%A9%D7%97%D7%9E%D7%98">לוח שחמט</a> כך שאף אחת מהן לא מאיימת על אף אחת מחברותיה. החידה היא מקרה פרטי של <strong>בעיית n המלכות</strong>, בעיה דומה בה יש להציב n מלכות על לוח בגודל n x n.<br>
לחידה 92 פתרונות: 12 יסודיים, ומהם מקבלים בעזרת שיקוף וסיבוב הלוח את שאר הפתרונות.<br>
– ויקיפדיה</p>
</blockquote>
<p>פתרו את בעית N המלכות בעזרת פייתון.</p>
<p>טיפ: זהו תרגיל קשה, אבל מגה מוכר ופופולרי ויש אינסוף פתרונות אליו באינטרנט. אל תחפשו את הפתרונות, לפתור אותו (גם אם ייקח לכם כמה ימים) זו גאווה קטנה <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"> להסתכל על פתרון יגרום תחושת החמצה כל פעם שתשמעו את החידה הזו בעתיד <img src="https://forums.pythonic.guru/images/emoji/twitter/stuck_out_tongue.png?v=9" title=":stuck_out_tongue:" class="emoji" alt=":stuck_out_tongue:"></p>
<p><small>8 פוסטים - 6 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/n/5608">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/n/5608</link>
<pubDate>Wed, 29 Apr 2020 21:51:06 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-5608</guid>
<source url="https://forums.pythonic.guru/t/n/5608.rss">[אתגר קשה] חידת N המלכות</source>
</item>
<item>
<title>[אתגר] לסדר את הבלאגן</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>ברשימה לצורך תרגיל זה יכולים להיות רק שלושה סוגי איברים: 1, 2 ו־3.<br>
כתבו פונקציה בשם <code>sort_3</code> שמקבלת רשימה לא מסודרת, ומסדרת את האיברים לפי ערכם <strong>בריצה אחת בלבד על הרשימה</strong>.</p>
<p>לדוגמה:</p>
<ul>
<li>עבור הרשימה <code>[1, 2, 3, 2, 1]</code> יוחזר <code>[1, 1, 2, 2, 3]</code>.</li>
<li>עבור הרשימה <code>[1, 2 ,2, 2, 2, 1]</code> יוחזר <code>[1, 1, 2, 2, 2, 2]</code>.</li>
<li>עבור הרשימה <code>[]</code> יוחזר <code>[]</code>.</li>
</ul>
<p>אסור:</p>
<ul>
<li>לבצע פעולות של רשימה (pop/append/insert/extend)</li>
<li>ליצור רשימה חדשה</li>
</ul>
<p>בדיקות:</p>
<pre><code class="lang-auto">import random
def check_test_case(test_case):
try:
result = sort_3(test_case)
except Exception as e:
print(f"Exception in {test_case}: {e}")
return
expected = sorted(test_case)
assert result == expected, f"Problem: {result} != {expected}"
def random_checks(check_size):
for i in range(check_size):
test_case = random.choices([1, 2, 3], k=i)
check_test_case(test_case)
test_cases = [
[],
[1],
[2, 3],
[3, 2],
[1, 1, 1],
[3, 2, 1],
[1, 3, 2]
]
for test_case in test_cases:
check_test_case(test_case)
random_checks(1_000)
</code></pre>
<p>התרגיל הזה מצריך מעט מחשבה אלגוריתמית והוא חידתי למדי, אבל אני מאמין בכם שאתם מסוגלים לפתור אותו <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>
<p><small>58 פוסטים - 12 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/topic/5390">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/topic/5390</link>
<pubDate>Sun, 26 Apr 2020 07:56:36 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-5390</guid>
<source url="https://forums.pythonic.guru/t/topic/5390.rss">[אתגר] לסדר את הבלאגן</source>
</item>
<item>
<title>[אתגר קשה] כל הקומבינציות</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>כתבו פונקציה בשם <code>combinations</code> שמקבלת שני פרמטרים בלבד – רשימת איברים (<code>items</code>), ואורך כל תוצאה (<code>n</code>).<br>
הפונקציה תחזיר <strong>רשימה של רשימות</strong>, בה כל רשימה פנימית תכלול קומבינציה אפשרית של האיברים ברשימה <code>items</code> באורך <code>n</code>.</p>
<p>לדוגמה:</p>
<pre><code class="lang-auto">combinations([1, 2, 3], 2)
</code></pre>
<p>תחזיר:</p>
<blockquote>
<p>[[1, 2], [1, 3], [2, 3]]</p>
</blockquote>
<p>בונוסים:</p>
<ol>
<li>דאגו שהפונקציה תוכל לפעול גם על מחרוזות</li>
<li>החזירו טאפלים כאיברים הפנימיים במקום רשימות</li>
</ol>
<p>לדוגמה:</p>
<pre><code class="lang-auto">combinations('abcde', 3)
</code></pre>
<p>תחזיר:</p>
<blockquote>
<p>[(‘a’, ‘b’, ‘c’),<br>
(‘a’, ‘b’, ‘d’),<br>
(‘a’, ‘b’, ‘e’),<br>
(‘a’, ‘c’, ‘d’),<br>
(‘a’, ‘c’, ‘e’),<br>
(‘a’, ‘d’, ‘e’),<br>
(‘b’, ‘c’, ‘d’),<br>
(‘b’, ‘c’, ‘e’),<br>
(‘b’, ‘d’, ‘e’),<br>
(‘c’, ‘d’, ‘e’)]</p>
</blockquote>
<p>מוזמנים ומוזמנות לפרסם פה את הפתרונות שלכם <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>
<p><em>תזכורת:</em> חלק מהאתגרים שמתפרסמים פה קשים מאוד. זה בסדר גמור לא להצליח אותם. האתגר הזה באופן ספציפי הוא כנראה בין הקשים שהתפרסמו עד עכשיו בקורס.</p>
<p><small>36 פוסטים - 20 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/topic/5290">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/topic/5290</link>
<pubDate>Fri, 24 Apr 2020 09:08:17 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-5290</guid>
<source url="https://forums.pythonic.guru/t/topic/5290.rss">[אתגר קשה] כל הקומבינציות</source>
</item>
<item>
<title>[אתגר] מקסימום רקורסיבי</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>כתבו פונקציה בשם <code>maximum</code> שמקבלת כפרמטר רשימת מספרים.<br>
הפונקציה תחזיר את המספר המקסימלי במערך מבלי להשתמש בלולאות.<br>
השתמשו רק בחומר שלמדנו עד כה.</p>
<p>אתם רשאים לפרסם פה את הפתרון שלכם <img src="https://forums.pythonic.guru/images/emoji/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"><br>
אנחנו ממליצים לכולם לא להסתכל על הפתרון של אחרים ולנסות לפתור בעצמם.<br>
שימו לב שמדובר בשאלה קשה מאוד, וזה בסדר גמור לא להצליח לפתור אותה בשלב הזה של הקורס.</p>
<p>ניתן לבדוק האם הפתרון שלכם עובד בעזרת הרצת הקוד שכאן אחרי שהגדרתם את הפונקציה שלכם:</p>
<pre><code class="lang-python">import random
def listgen1():
return [random.uniform(-1000, 1000) for i in range(random.randrange(1, 999))]
def listgen2():
return [random.randrange(-1000, 1000) for i in range(random.randrange(1, 999))]
def listgen3():
return [0 for i in range(random.randrange(1, 999))]
def listgen4():
return [9.9 for i in range(random.randrange(1, 999))]
def check(l):
try:
assert max(l) == maximum(l), f"Failed for input {l}"
except Exception as e:
print(f"{e}, {l}")
check([1, 2, 3])
check([3, 2, 1])
check([3, 1, 1])
check([3, 3, 1])
check([1])
for i in range(100):
check(listgen1())
check(listgen2())
check(listgen3())
check(listgen4())
</code></pre>
<p><small>72 פוסטים - 26 משתתפים</small></p>
<p><a href="https://forums.pythonic.guru/t/topic/5245">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/topic/5245</link>
<pubDate>Thu, 23 Apr 2020 06:52:15 +0000</pubDate>
<discourse:topicPinned>No</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-5245</guid>
<source url="https://forums.pythonic.guru/t/topic/5245.rss">[אתגר] מקסימום רקורסיבי</source>
</item>
<item>
<title>על הקטגוריה אתגר</title>
<dc:creator><![CDATA[Yam]]></dc:creator>
<category>אתגר</category>
<description><![CDATA[
<p>כאן נפרסם שאלות נוספות ושאלות אתגר למי שמעוניין להעמיק בחומר ולתרגל שאלות נוספות.</p>
<p><small>פוסט 1 - משתתף 1</small></p>
<p><a href="https://forums.pythonic.guru/t/topic/5244">קריאת הנושא במלואו</a></p>
]]></description>
<link>https://forums.pythonic.guru/t/topic/5244</link>
<pubDate>Thu, 23 Apr 2020 06:30:46 +0000</pubDate>
<discourse:topicPinned>Yes</discourse:topicPinned>
<discourse:topicClosed>No</discourse:topicClosed>
<discourse:topicArchived>No</discourse:topicArchived>
<guid isPermaLink="false">forums.pythonic.guru-topic-5244</guid>
<source url="https://forums.pythonic.guru/t/topic/5244.rss">על הקטגוריה אתגר</source>
</item>
</channel>
</rss>