|
121 | 121 | "</p>\n", |
122 | 122 | "\n", |
123 | 123 | "<code style=\"text-align: left; direction: ltr; float: left; clear: both;\">temp_hash = 1</code><br>\n", |
124 | | - "<code style=\"text-align: left; direction: ltr; float: left; clear: both;\">temp_hash = (temp_hash*ord('a')*1) % 397643</code>\n", |
125 | | - "<samp style=\"text-align: left; direction: ltr; float: left; clear: both;\"># temp_hash = (1*97*1) % 397643 = 97</samp><br>\n", |
| 124 | + "<code style=\"text-align: left; direction: ltr; float: left; clear: both;\">temp_hash = (temp_hash * ord('a') * 1) % 397643</code>\n", |
| 125 | + "<samp style=\"text-align: left; direction: ltr; float: left; clear: both;\"># temp_hash = (1 * 97 * 1) % 397643 = 97</samp><br>\n", |
126 | 126 | "\n", |
127 | 127 | "<p style=\"text-align: right; direction: rtl; float: right; clear: both;\">\n", |
128 | 128 | " שימו לב שכאן הכפלנו ב־1, כיוון שמיקום האות הוא 0 ואנו מכפילים\n", |
129 | 129 | " <em>באינדקס האות הבאה.</em>\n", |
130 | 130 | "</p>\n", |
131 | 131 | "\n", |
132 | | - "<code style=\"text-align: left; direction: ltr; float: left; clear: both;\">temp_hash = (temp_hash*ord('b')*2) % 397643</code>\n", |
133 | | - "<samp style=\"text-align: left; direction: ltr; float: left; clear: both;\"># temp_hash = (97*98*2) % 397643 = 19012</samp>\n", |
134 | | - "<code style=\"text-align: left; direction: ltr; float: left; clear: both;\">temp_hash = (temp_hash*ord('a')*3) % 397643</code>\n", |
135 | | - "<samp style=\"text-align: left; direction: ltr; float: left; clear: both;\"># temp_hash = (19012*97*3) % 397643 = 363133</samp>\n", |
| 132 | + "<code style=\"text-align: left; direction: ltr; float: left; clear: both;\">temp_hash = (temp_hash * ord('b') * 2) % 397643</code>\n", |
| 133 | + "<samp style=\"text-align: left; direction: ltr; float: left; clear: both;\"># temp_hash = (97 * 98 * 2) % 397643 = 19012</samp>\n", |
| 134 | + "<code style=\"text-align: left; direction: ltr; float: left; clear: both;\">temp_hash = (temp_hash * ord('a') * 3) % 397643</code>\n", |
| 135 | + "<samp style=\"text-align: left; direction: ltr; float: left; clear: both;\"># temp_hash = (19012 * 97 * 3) % 397643 = 363133</samp>\n", |
136 | 136 | "<code style=\"text-align: left; direction: ltr; float: left; clear: both;\">return temp_hash % 100297</code>\n", |
137 | 137 | "<samp style=\"text-align: left; direction: ltr; float: left; clear: both;\"># temp_hash = 363133 % 100297 = <b>62242</b></samp>" |
138 | 138 | ] |
|
853 | 853 | "name": "python", |
854 | 854 | "nbconvert_exporter": "python", |
855 | 855 | "pygments_lexer": "ipython3", |
856 | | - "version": "3.7.4" |
| 856 | + "version": "3.7.1" |
857 | 857 | } |
858 | 858 | }, |
859 | 859 | "nbformat": 4, |
|
0 commit comments