-
Notifications
You must be signed in to change notification settings - Fork 218
Week2 fixes #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Week2 fixes #14
Changes from 19 commits
7a8685b
a737222
6d3a627
270c287
4225ec8
f84d0e0
4026819
55b40d0
9708626
d6cea05
bfb8506
293fab2
4f8e1d5
767f1d6
3711ccf
ab52486
4d9dbee
d702e6f
9d16114
9be008e
eff152e
6c75208
cf4acfe
307c5b2
0b01cef
ef88706
49acc6a
f44c4aa
13cdbf3
5f062ed
6c6b25d
9d27cbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,7 +186,7 @@ | |
"מה התרחש בקוד?<br>\n", | ||
"התחלנו את הגדרת הרשימה באמצעות התו <code dir=\"ltr\" style=\"direction: ltr;\">[</code>.<br>\n", | ||
"מיד אחרי התו הזה דאגנו להכניס איברים לרשימה לפי הסדר הרצוי, כאשר כל איבר מופרד ממשניהו בתו פסיק (<code>,</code>).<br>\n", | ||
"במקרה שלנו, כל איבר הוא מחרוזת המייצגת ראש ממשלה, והם <mark>מסודרים ברשימה</mark> לפי סדר כהונתם.<br>\n", | ||
"במקרה שלנו, כל איבר הוא מחרוזת המייצגת ראש ממשלה ודאגנו להגדיר את הרשימה כך שתכיל את הערכים (ראשי ממשלה) <mark>לפי סדר</mark> כהונתם.<br>\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just more verbose. What did you try to accomplish here? :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My thought was to explain that we explicitly declared the list in the right order (meaning the list keeps its order from init). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. , before ודאגנו |
||
"שימו לב שהרשימה מכילה איבר מסוים פעמיים – מכאן ש<mark>רשימה היא מבנה נתונים שתומך בחזרות</mark>.<br>\n", | ||
"לסיום, נסגור את הגדרת הרשימה באמצעות התו <code dir=\"ltr\" style=\"direction: ltr;\">]</code>.<br>\n", | ||
"</p>" | ||
|
@@ -308,7 +308,7 @@ | |
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# 0 1 2 3 4 5\n", | ||
"# Index 0 1 2 3 4 5\n", | ||
"vinyls = ['Ecliptica', 'GoT Season 6', 'Lone Digger', 'Everything goes numb', 'Awesome Mix Vol. 1', 'Ultimate Sinatra']" | ||
] | ||
}, | ||
|
@@ -342,6 +342,7 @@ | |
" <div style=\"width: 90%\">\n", | ||
" <p style=\"text-align: right; direction: rtl; clear: both;\">\n", | ||
" המספור של התא הראשון הוא 0, ולא 1. יש לכך סיבות טובות, אבל פעמים רבות זה ירגיש לא טבעי ועלול ליצור באגים.<br>\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ועלול ליצור <dfn>באגים</dfn> – חלקים בקוד שלא מתנהגים כפי שחשבנו שיתנהגו. |
||
" <em>* באג הוא קטע קוד המתנהג לא כמצופה.</em><br>\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Merge with the line about באגים, so it would sound more natural. המספור של התא הראשון הוא 0, ולא 1. יש לכך סיבות טובות, אבל פעמים רבות זה ירגיש לא טבעי. |
||
" כפועל יוצא, המיקום ברשימה של התא האחרון לא יהיה כאורך הרשימה, אלא כאורך הרשימה פחות אחד.<br>\n", | ||
" משמע: ברשימה שבה 3 איברים, התא האחרון יהיה ממוספר 2.\n", | ||
" </p>\n", | ||
|
@@ -470,15 +471,16 @@ | |
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"#### <p style=\"text-align: right; direction: rtl; float: right;\">השמה ברשימות</p>" | ||
"### <p style=\"text-align: right; direction: rtl; float: right;\">השמה ברשימות</p>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"<p style=\"text-align: right; direction: rtl; float: right; clear: both;\">\n", | ||
"טריק שימושי בטירוף שנחמד לדעת, הוא שניתן להשתמש בהשמה על מנת לשנות את האיבר שמופיע בתא מסוים ברשימה:\n", | ||
"לפעמים נרצה לשנות את הערך של האיברים ברשימה.<br>\n", | ||
IdoElk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"נוכל להקביל את זה לכך שאנו נפתח את המגירה במקום ספציפי ונחליף בין הערך הישן לחדש.\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. נוכל להקביל שינוי ערך של איבר לכך... |
||
"</p>" | ||
] | ||
}, | ||
|
@@ -514,7 +516,7 @@ | |
"metadata": {}, | ||
"source": [ | ||
"<p style=\"text-align: right; direction: rtl; float: right; clear: both;\">\n", | ||
"כפי ש<code>+</code> משרשר בין מחרוזות, הוא יודע לשרשר גם בין רשימות:\n", | ||
"כפי ש-<code>+</code> משרשר בין מחרוזות, הוא יודע לשרשר גם בין רשימות:\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the Hebrew hyphen instead: ־ |
||
"</p>" | ||
] | ||
}, | ||
|
@@ -579,7 +581,6 @@ | |
"<p style=\"text-align: right; direction: rtl; float: right; clear: both;\">\n", | ||
"שימו לב שכל אופרטור שתשימו ליד הרשימה מתייחס <em>לרשימה בלבד</em>, ולא לאיברים שבתוכה.<br>\n", | ||
"משמעו ש־<code dir=\"ltr\" style=\"direction: ltr;\">+ 5</code> לא יוסיף לכם 5 לכל אחד מהאיברים, אלא יכשל מכיוון שפייתון לא יודע לחבר בין רשימה למספר שלם.<br>\n", | ||
"ניסיון להשתמש באופרטור <code>*</code> בין רשימה למספר יגרור אותה תוצאה, ויגרום לפייתון לזרוק שגיאה.\n", | ||
"</p>" | ||
] | ||
}, | ||
|
@@ -1016,7 +1017,7 @@ | |
"<ol style=\"text-align: right; direction: rtl; float: right; clear: both;\">\n", | ||
" <li>הביטוי הבוליאני בשורה 1 מחזיר <samp>False</samp>, מכיוון שכל אחד מהאיברים ברשימה <var>pupils</var> הוא רשימה, ואף אחד מהם אינו המחרוזת <em>\"Moshe\"</em>.</li>\n", | ||
" <li>הביטוי הבוליאני בשורה 2 מחזיר <samp>True</samp>, מכיוון שהרשימה האחרונה בתוך <var>pupils</var> מחזיר רשימה המכילה את המחרוזת <em>\"Moshe\"</em>.</li>\n", | ||
" <li>הביטוי הבוליאני בשורה 3 מחזיר <samp>False</samp>, מכיוון אשאין בתוך <var>pupils</var> רשימה שאלו בדיוק הערכים שלה. יש אמנם רשימה שמכילה את האיברים האלו, אבל השאלה הייתה האם הרשימה הגדולה (<var>pupils</var>) מכילה ישירות את הרשימה הקטנה (<code>['Moshe', 'Splinter']</code>).</li>\n", | ||
" <li>הביטוי הבוליאני בשורה 3 מחזיר <samp>False</samp>, מכיוון שאין בתוך <var>pupils</var> רשימה שאלו בדיוק הערכים שלה. יש אמנם רשימה שמכילה את האיברים האלו, אבל השאלה הייתה האם הרשימה הגדולה (<var>pupils</var>) מכילה איבר שהוא שווה בדיוק ל- (<code>['Moshe', 'Splinter']</code>).</li>\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. שהוא שווה -> ששווה |
||
" <li>הביטוי הבוליאני בשורה 4 מחזיר <samp>False</samp>, מכיוון שברשימה האחרונה בתוך <var>pupils</var> אין איבר שהוא הרשימה <code>[\"Moshe\", \"Splinter\"]</code>.</li>\n", | ||
" <li>הביטוי הבוליאני בשורה 5 מחזיר <samp>True</samp>, מכיוון שיש רשימה ישירות בתוך <var>pupils</var> שאלו הם ערכיה.</li>\n", | ||
" <li>הביטוי הבוליאני בשורה 6 מחזיר <samp>False</samp>, מכיוון שברשימה האחרונה בתוך <var>pupils</var> אין איבר שהוא הרשימה הזו.</li>\n", | ||
|