|
9 | 9 | } |
10 | 10 | }, |
11 | 11 | "source": [ |
12 | | - "# Tutorial: Python Absolute Beginner Module 1: Introduction (P1M1)\n", |
| 12 | + "# P1M1 Tutorial: Python Absolute Beginner Module 1: Introduction\n", |
13 | 13 | "## Getting started with Python in Jupyter Notebooks\n", |
14 | 14 | "- **Python 3 in Jupyter notebooks**\n", |
15 | 15 | "- **`print()`**\n", |
|
92 | 92 | "slide_type": "subslide" |
93 | 93 | } |
94 | 94 | }, |
95 | | - "outputs": [ |
96 | | - { |
97 | | - "name": "stdout", |
98 | | - "output_type": "stream", |
99 | | - "text": [ |
100 | | - "Hello World!\n" |
101 | | - ] |
102 | | - } |
103 | | - ], |
| 95 | + "outputs": [], |
104 | 96 | "source": [ |
105 | 97 | "# Review the code, run the code\n", |
106 | 98 | "print(\"Hello World!\")" |
|
110 | 102 | "cell_type": "code", |
111 | 103 | "execution_count": null, |
112 | 104 | "metadata": {}, |
113 | | - "outputs": [ |
114 | | - { |
115 | | - "name": "stdout", |
116 | | - "output_type": "stream", |
117 | | - "text": [ |
118 | | - "Hello programmer!\n" |
119 | | - ] |
120 | | - } |
121 | | - ], |
| 105 | + "outputs": [], |
122 | 106 | "source": [ |
123 | 107 | "print(\"Hello programmer!\")" |
124 | 108 | ] |
|
352 | 336 | }, |
353 | 337 | { |
354 | 338 | "cell_type": "code", |
355 | | - "execution_count": 6, |
| 339 | + "execution_count": null, |
356 | 340 | "metadata": {}, |
357 | | - "outputs": [ |
358 | | - { |
359 | | - "name": "stdout", |
360 | | - "output_type": "stream", |
361 | | - "text": [ |
362 | | - "strings go in single\n", |
363 | | - "or double quotes\n" |
364 | | - ] |
365 | | - } |
366 | | - ], |
| 341 | + "outputs": [], |
367 | 342 | "source": [ |
368 | 343 | "# examples of printing strings with single and double quotes\n", |
369 | 344 | "print('strings go in single')\n", |
|
416 | 391 | }, |
417 | 392 | { |
418 | 393 | "cell_type": "code", |
419 | | - "execution_count": 7, |
| 394 | + "execution_count": null, |
420 | 395 | "metadata": {}, |
421 | | - "outputs": [ |
422 | | - { |
423 | | - "name": "stdout", |
424 | | - "output_type": "stream", |
425 | | - "text": [ |
426 | | - "123\n", |
427 | | - "123\n" |
428 | | - ] |
429 | | - } |
430 | | - ], |
| 396 | + "outputs": [], |
431 | 397 | "source": [ |
432 | 398 | "print(123) #integer, with numeric value\n", |
433 | 399 | "print(\"123\") #string, represents text characters" |
|
466 | 432 | }, |
467 | 433 | { |
468 | 434 | "cell_type": "code", |
469 | | - "execution_count": 8, |
| 435 | + "execution_count": null, |
470 | 436 | "metadata": {}, |
471 | | - "outputs": [ |
472 | | - { |
473 | | - "name": "stdout", |
474 | | - "output_type": "stream", |
475 | | - "text": [ |
476 | | - "299\n", |
477 | | - "2017\n" |
478 | | - ] |
479 | | - } |
480 | | - ], |
| 437 | + "outputs": [], |
481 | 438 | "source": [ |
482 | 439 | "# printing an Integer with python\n", |
483 | 440 | "print(299)\n", |
|
563 | 520 | }, |
564 | 521 | { |
565 | 522 | "cell_type": "code", |
566 | | - "execution_count": 12, |
| 523 | + "execution_count": null, |
567 | 524 | "metadata": {}, |
568 | | - "outputs": [ |
569 | | - { |
570 | | - "name": "stdout", |
571 | | - "output_type": "stream", |
572 | | - "text": [ |
573 | | - "I am a string\n", |
574 | | - "Run this cell using Ctrl+Enter\n" |
575 | | - ] |
576 | | - } |
577 | | - ], |
| 525 | + "outputs": [], |
578 | 526 | "source": [ |
579 | 527 | "# [ ] Review code and Run\n", |
580 | 528 | "# initialize the variable\n", |
|
589 | 537 | }, |
590 | 538 | { |
591 | 539 | "cell_type": "code", |
592 | | - "execution_count": 11, |
| 540 | + "execution_count": null, |
593 | 541 | "metadata": { |
594 | 542 | "scrolled": true |
595 | 543 | }, |
596 | | - "outputs": [ |
597 | | - { |
598 | | - "name": "stdout", |
599 | | - "output_type": "stream", |
600 | | - "text": [ |
601 | | - "Run this cell using Ctrl+Enter\n" |
602 | | - ] |
603 | | - } |
604 | | - ], |
| 544 | + "outputs": [], |
605 | 545 | "source": [ |
606 | 546 | "# [ ] Review code and Run\n", |
607 | 547 | "# assign a new string to the current_msg\n", |
|
3124 | 3064 | }, |
3125 | 3065 | { |
3126 | 3066 | "cell_type": "code", |
3127 | | - "execution_count": 2, |
| 3067 | + "execution_count": null, |
3128 | 3068 | "metadata": {}, |
3129 | | - "outputs": [ |
3130 | | - { |
3131 | | - "name": "stdout", |
3132 | | - "output_type": "stream", |
3133 | | - "text": [ |
3134 | | - "red\n" |
3135 | | - ] |
3136 | | - } |
3137 | | - ], |
| 3069 | + "outputs": [], |
3138 | 3070 | "source": [ |
3139 | 3071 | "# review and run code - test a capitalized color input\n", |
3140 | 3072 | "fav_color = input('What is your favorite color?: ').lower()\n", |
|
3152 | 3084 | }, |
3153 | 3085 | { |
3154 | 3086 | "cell_type": "code", |
3155 | | - "execution_count": 5, |
| 3087 | + "execution_count": null, |
3156 | 3088 | "metadata": {}, |
3157 | | - "outputs": [ |
3158 | | - { |
3159 | | - "name": "stdout", |
3160 | | - "output_type": "stream", |
3161 | | - "text": [ |
3162 | | - "BLUE reversed\n", |
3163 | | - "NBLAH blahblah\n" |
3164 | | - ] |
3165 | | - } |
3166 | | - ], |
| 3089 | + "outputs": [], |
3167 | 3090 | "source": [ |
3168 | 3091 | "def short_rhyme(r1,r2):\n", |
3169 | 3092 | " print(r1.upper(),r2.lower())\n", |
|
3256 | 3179 | }, |
3257 | 3180 | { |
3258 | 3181 | "cell_type": "code", |
3259 | | - "execution_count": 1, |
| 3182 | + "execution_count": null, |
3260 | 3183 | "metadata": {}, |
3261 | | - "outputs": [ |
3262 | | - { |
3263 | | - "name": "stdout", |
3264 | | - "output_type": "stream", |
3265 | | - "text": [ |
3266 | | - "Your name is dominic\n" |
3267 | | - ] |
3268 | | - } |
3269 | | - ], |
| 3184 | + "outputs": [], |
3270 | 3185 | "source": [ |
3271 | 3186 | "# [] print 3 tests, with description text, testing the menu variable for 'pizza', 'soup' and 'dessert'\n", |
3272 | 3187 | "menu = \"salad, pasta, sandwich, pizza, drinks, dessert\"\n", |
|
0 commit comments