Skip to content

Commit 55b40d0

Browse files
committed
Added code cells for user's exercises and minor fixes
1 parent 4026819 commit 55b40d0

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

week2/5_String_Methods.ipynb

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"<p style=\"text-align: right; direction: rtl; float: right; clear: both;\">\n",
2929
"לפעמים נרצה שהמחרוזת שלנו תעשה \"דברים מיוחדים\" – כמו לרדת שורה באמצע המחרוזת, או לעשות ריווח גדול באמצעות <kbd dir=\"ltr\" style=\"direction: ltr\">↹ TAB</kbd> (לצורך טבלאות, לדוגמה).<br>\n",
3030
"המחשב מתייחס להזחה ולשורה חדשה כתווים של ממש, ועבור כל \"תו מיוחד\" שכזה יצרו רצף של תווים שמייצג אותו.<br>\n",
31-
"לדוגמה, כשנדע מה הוא רצף התווים שמייצגים שורה חדשה, נוכל לכתוב אותם כחלק מהמחרוזת, ובמקום בו רשמנו אותן במחרוזת נראה שורה חדשה בהדפסה.\n",
31+
"לדוגמה, כשנדע מה הוא רצף התווים שמייצגים שורה חדשה, נוכל לכתוב אותם כחלק מהמחרוזת, וכאשר נדפיס אותה נראה ירידת שורה במקום רצף התווים.\n",
3232
"</p>"
3333
]
3434
},
@@ -178,6 +178,13 @@
178178
"</blockquote>"
179179
]
180180
},
181+
{
182+
"cell_type": "code",
183+
"execution_count": null,
184+
"metadata": {},
185+
"outputs": [],
186+
"source": []
187+
},
181188
{
182189
"cell_type": "markdown",
183190
"metadata": {},
@@ -251,6 +258,13 @@
251258
"</div>"
252259
]
253260
},
261+
{
262+
"cell_type": "code",
263+
"execution_count": null,
264+
"metadata": {},
265+
"outputs": [],
266+
"source": []
267+
},
254268
{
255269
"cell_type": "markdown",
256270
"metadata": {},
@@ -264,14 +278,14 @@
264278
"source": [
265279
"<p style=\"text-align: right; direction: rtl; float: right; clear: both;\">\n",
266280
"עד כה שרשרנו מחרוזות בזהירות בעזרת סימן השרשור, <code>+</code>.<br>\n",
267-
"דרך נחמדה לעשות את זה היא <dfn>fstring</dfn>, או בשמן המלא, <dfn>formatted strings</dfn>.<br>\n",
281+
"הדרך הנכונה לעשות את זה היא בעזרת <dfn>fstring</dfn>, או בשמן המלא, <dfn>formatted strings</dfn>.<br>\n",
268282
"נראה דוגמה:\n",
269283
"</p>"
270284
]
271285
},
272286
{
273287
"cell_type": "code",
274-
"execution_count": 142,
288+
"execution_count": null,
275289
"metadata": {},
276290
"outputs": [],
277291
"source": [
@@ -290,17 +304,9 @@
290304
},
291305
{
292306
"cell_type": "code",
293-
"execution_count": 146,
294-
"metadata": {},
295-
"outputs": [
296-
{
297-
"name": "stdout",
298-
"output_type": "stream",
299-
"text": [
300-
"My age is 18 and my name is Yam.\n"
301-
]
302-
}
303-
],
307+
"execution_count": null,
308+
"metadata": {},
309+
"outputs": [],
304310
"source": [
305311
"print(\"My age is \" + str(age) + \" and my name is \" + name + \".\")"
306312
]
@@ -310,23 +316,15 @@
310316
"metadata": {},
311317
"source": [
312318
"<p style=\"text-align: right; direction: rtl; float: right; clear: both;\">\n",
313-
"שימוש ב־<em>fstrings</erm>:\n",
319+
"שימוש ב־<em>fstrings</em>:\n",
314320
"</p>"
315321
]
316322
},
317323
{
318324
"cell_type": "code",
319-
"execution_count": 147,
320-
"metadata": {},
321-
"outputs": [
322-
{
323-
"name": "stdout",
324-
"output_type": "stream",
325-
"text": [
326-
"My age is 18 and my name is Yam.\n"
327-
]
328-
}
329-
],
325+
"execution_count": null,
326+
"metadata": {},
327+
"outputs": [],
330328
"source": [
331329
"print(f\"My age is {age} and my name is {name}.\")"
332330
]

0 commit comments

Comments
 (0)