|
109 | 109 | "cell_type": "markdown", |
110 | 110 | "metadata": {}, |
111 | 111 | "source": [ |
112 | | - "## #3 Write a function that takes a list of numbers and returns True of all number in the list are unique and returns False if the list contains duplicate numbers. \n", |
| 112 | + "## #3 Write a function that takes a list of numbers and returns True if all number in the list are unique and returns False if the list contains duplicate numbers. \n", |
113 | 113 | "* Hint, maybe think of using a set()\n", |
114 | 114 | "\n", |
115 | 115 | "Input: input_list = [2,4,5,5,7,9]\n", |
|
167 | 167 | }, |
168 | 168 | { |
169 | 169 | "cell_type": "code", |
170 | | - "execution_count": 5, |
| 170 | + "execution_count": 53, |
171 | 171 | "metadata": {}, |
172 | 172 | "outputs": [ |
173 | 173 | { |
|
180 | 180 | ], |
181 | 181 | "source": [ |
182 | 182 | "from collections import Counter\n", |
183 | | - "punctuations = [' ', '\\n', '-', ]\n", |
184 | 183 | "\n", |
185 | 184 | "with open('../Week-03/intermediate/data/lil-wayne.txt', 'r') as file:\n", |
186 | 185 | " text = file.read().upper()\n", |
|
492 | 491 | }, |
493 | 492 | { |
494 | 493 | "cell_type": "code", |
495 | | - "execution_count": 15, |
| 494 | + "execution_count": 54, |
496 | 495 | "metadata": {}, |
497 | 496 | "outputs": [ |
498 | 497 | { |
499 | 498 | "name": "stdout", |
500 | 499 | "output_type": "stream", |
501 | 500 | "text": [ |
502 | | - "11425.0\n" |
| 501 | + "1142.5\n" |
503 | 502 | ] |
504 | 503 | } |
505 | 504 | ], |
|
508 | 507 | "word_per_page = 250\n", |
509 | 508 | "number_of_pieces = 100\n", |
510 | 509 | "\n", |
511 | | - "each_chunk = (457 * 250)/10\n", |
| 510 | + "each_chunk = (457 * 250)/100\n", |
512 | 511 | "print(each_chunk)" |
513 | 512 | ] |
514 | 513 | }, |
515 | | - { |
516 | | - "cell_type": "code", |
517 | | - "execution_count": null, |
518 | | - "metadata": {}, |
519 | | - "outputs": [], |
520 | | - "source": [] |
521 | | - }, |
522 | | - { |
523 | | - "cell_type": "code", |
524 | | - "execution_count": null, |
525 | | - "metadata": {}, |
526 | | - "outputs": [], |
527 | | - "source": [] |
528 | | - }, |
529 | | - { |
530 | | - "cell_type": "code", |
531 | | - "execution_count": null, |
532 | | - "metadata": {}, |
533 | | - "outputs": [], |
534 | | - "source": [] |
535 | | - }, |
536 | 514 | { |
537 | 515 | "cell_type": "markdown", |
538 | 516 | "metadata": {}, |
|
1228 | 1206 | "# as (key/index, value) pairs...a dictionary if you will\n", |
1229 | 1207 | "# After that its just a matter of manipulating the dictionary as needed " |
1230 | 1208 | ] |
1231 | | - }, |
1232 | | - { |
1233 | | - "cell_type": "code", |
1234 | | - "execution_count": null, |
1235 | | - "metadata": {}, |
1236 | | - "outputs": [], |
1237 | | - "source": [] |
1238 | 1209 | } |
1239 | 1210 | ], |
1240 | 1211 | "metadata": { |
|
0 commit comments