Skip to content

Commit d987a81

Browse files
committed
Updated P2M2 and P2M3 with new video links and cleaned out old.
1 parent da3c66f commit d987a81

File tree

3 files changed

+602
-155
lines changed

3 files changed

+602
-155
lines changed

6 Web Page with Flask/basic page/script1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def greet():
1010
@app.route('/')
1111
def home():
1212

13-
return render_template("home.html",myName="")
13+
return render_template("home.html",myName="Type your name in the box and click submit!")
1414

1515
@app.route('/about/')
1616
def about():

Python Fundamentals/Module_2.0_Tutorials_Sequence_Lists_Python_Fundamentals.ipynb

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Module 2 - Python Fundamentals\n",
7+
"# Python Fundamentals Module 2: Lists (P2M2)\n",
88
"## Sequence: Lists \n",
99
"- **List Creation**\n",
1010
"- **List Access**\n",
@@ -29,7 +29,7 @@
2929
"#  \n",
3030
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
3131
"## Creating Lists\n",
32-
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( http://edxinteractivepage.blob.core.windows.net/edxpages/f7cff1a7-5601-48a1-95a6-fd1fdfabd20e.html?details=[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/933c4e57-93ae-4660-8725-6eff3987dd1c/Unit2_Section2.1a-Creating_Lists.ism/manifest\",\"type\":\"application/vnd.ms-sstr+xml\"}],[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/933c4e57-93ae-4660-8725-6eff3987dd1c/Unit2_Section2.1a-Creating_Lists.vtt\",\"srclang\":\"en\",\"kind\":\"subtitles\",\"label\":\"english\"}])\n",
32+
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( https://youtu.be/RA1tMeHWjh0)\n",
3333
"A simple lists contains **comma separated** objects enclosed in **square brackets** \n",
3434
"```python\n",
3535
"empty_list = [ ]\n",
@@ -144,7 +144,6 @@
144144
"# &nbsp;\n",
145145
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
146146
"## List Access \n",
147-
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( http://edxinteractivepage.blob.core.windows.net/edxpages/f7cff1a7-5601-48a1-95a6-fd1fdfabd20e.html?details=[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/efc23682-3b15-4c73-afe0-77067fac2769/Unit2_Section2.1b-Accessing_Lists.ism/manifest\",\"type\":\"application/vnd.ms-sstr+xml\"}],[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/efc23682-3b15-4c73-afe0-77067fac2769/Unit2_Section2.1b-Accessing_Lists.vtt\",\"srclang\":\"en\",\"kind\":\"subtitles\",\"label\":\"english\"}])\n",
148147
"### Counting like a computer\n",
149148
"#### To access a list we need to count like a computer, and that means starting with zero (0)\n",
150149
"Lists give an **index** number to each list item\n",
@@ -165,7 +164,7 @@
165164
"\n",
166165
"<font size=\"4\" color=\"#00A0B2\" face=\"verdana\"> <B>Examples</B></font>\n",
167166
"\n",
168-
"|run previous examples before running the examples below|\n",
167+
"|run previous examples before running the examples below Why? Because running them puts their results in memory, available to the code below to use to do further calculations and work |\n",
169168
"|-----------------------------------------------------------|\n"
170169
]
171170
},
@@ -298,7 +297,6 @@
298297
"# &nbsp;\n",
299298
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
300299
"## Appending to Lists\n",
301-
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( http://edxinteractivepage.blob.core.windows.net/edxpages/f7cff1a7-5601-48a1-95a6-fd1fdfabd20e.html?details=[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/121939c6-f81e-4787-a7a9-15ab15c69168/Unit2_Section2.2a-Appending_to_Lists.ism/manifest\",\"type\":\"application/vnd.ms-sstr+xml\"}],[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/121939c6-f81e-4787-a7a9-15ab15c69168/Unit2_Section2.2a-Appending_to_Lists.vtt\",\"srclang\":\"en\",\"kind\":\"subtitles\",\"label\":\"english\"}])\n",
302300
"**`.append()`** method adds an item to the end of a list \n",
303301
"```python\n",
304302
"party_list.append(\"Alton\")\n",
@@ -411,7 +409,6 @@
411409
"\n",
412410
"# [ ] print the list\n",
413411
"\n",
414-
"\n",
415412
"# [ ] append an item to the list and print the list\n",
416413
" \n"
417414
]
@@ -460,8 +457,7 @@
460457
"metadata": {},
461458
"outputs": [],
462459
"source": [
463-
"# [ ] complete the Birthday Survey task above\n",
464-
"\n"
460+
"# [ ] complete the Birthday Survey task above\n"
465461
]
466462
},
467463
{
@@ -514,7 +510,6 @@
514510
"# &nbsp;\n",
515511
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
516512
"## Insert a new value for an index\n",
517-
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( http://edxinteractivepage.blob.core.windows.net/edxpages/f7cff1a7-5601-48a1-95a6-fd1fdfabd20e.html?details=[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/219b35cf-03b5-4b57-8fbc-f5864281312d/Unit2_Section2.3a-Overwriting_an_Index.ism/manifest\",\"type\":\"application/vnd.ms-sstr+xml\"}],[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/219b35cf-03b5-4b57-8fbc-f5864281312d/Unit2_Section2.3a-Overwriting_an_Index.vtt\",\"srclang\":\"en\",\"kind\":\"subtitles\",\"label\":\"english\"}])\n",
518513
"### overwrite a specific index in a list\n",
519514
"```python\n",
520515
"party_list[2] = \"Tobias\"\n",
@@ -652,9 +647,7 @@
652647
"metadata": {},
653648
"outputs": [],
654649
"source": [
655-
"# [ ] create challenge function\n",
656-
"\n",
657-
"\n"
650+
"# [ ] create challenge function\n"
658651
]
659652
},
660653
{
@@ -692,7 +685,6 @@
692685
"# &nbsp;\n",
693686
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
694687
"## Insert items into a list\n",
695-
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( http://edxinteractivepage.blob.core.windows.net/edxpages/f7cff1a7-5601-48a1-95a6-fd1fdfabd20e.html?details=[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/659b9cd2-1e84-4ead-8a69-015c737577cd/Unit2_Section2.3b-Inserting_Items_into_Lists.ism/manifest\",\"type\":\"application/vnd.ms-sstr+xml\"}],[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/659b9cd2-1e84-4ead-8a69-015c737577cd/Unit2_Section2.3b-Inserting_Items_into_Lists.vtt\",\"srclang\":\"en\",\"kind\":\"subtitles\",\"label\":\"english\"}])\n",
696688
"### use `.insert()` to define an index to insert an item\n",
697689
"```python\n",
698690
"party_list.insert(2,\"Tobias\")\n",
@@ -804,7 +796,6 @@
804796
"# &nbsp;\n",
805797
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
806798
"## Delete a specific List index\n",
807-
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( http://edxinteractivepage.blob.core.windows.net/edxpages/f7cff1a7-5601-48a1-95a6-fd1fdfabd20e.html?details=[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/072d8761-7811-438e-a77f-72c9634c0f8c/Unit2_Section2.4a-Deleting_Specific_Index.ism/manifest\",\"type\":\"application/vnd.ms-sstr+xml\"}],[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/072d8761-7811-438e-a77f-72c9634c0f8c/Unit2_Section2.4a-Deleting_Specific_Index.vtt\",\"srclang\":\"en\",\"kind\":\"subtitles\",\"label\":\"english\"}])\n",
808799
"### `del ` statement \n",
809800
"```python\n",
810801
"del party_list[2]\n",
@@ -925,7 +916,6 @@
925916
"# &nbsp;\n",
926917
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
927918
"## .pop() gets and deletes item in list\n",
928-
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( http://edxinteractivepage.blob.core.windows.net/edxpages/f7cff1a7-5601-48a1-95a6-fd1fdfabd20e.html?details=[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/67b83f30-a92c-4d1f-a7a3-ca257dd4db4e/Unit2_Section2.4b-List_Pop_Method.ism/manifest\",\"type\":\"application/vnd.ms-sstr+xml\"}],[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/67b83f30-a92c-4d1f-a7a3-ca257dd4db4e/Unit2_Section2.4b-List_Pop_Method.vtt\",\"srclang\":\"en\",\"kind\":\"subtitles\",\"label\":\"english\"}])\n",
929919
"### `.pop()` method default is last item in a list\n",
930920
"```python\n",
931921
"last_item = party_list.pop()\n",
@@ -1024,7 +1014,6 @@
10241014
"# &nbsp;\n",
10251015
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
10261016
"## an empty list is False\n",
1027-
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( http://edxinteractivepage.blob.core.windows.net/edxpages/f7cff1a7-5601-48a1-95a6-fd1fdfabd20e.html?details=[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/20e00a13-a9d2-4a35-b75d-f6533fa15cbd/Unit2_Section2.4c-Empty_List_is_False.ism/manifest\",\"type\":\"application/vnd.ms-sstr+xml\"}],[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/20e00a13-a9d2-4a35-b75d-f6533fa15cbd/Unit2_Section2.4c-Empty_List_is_False.vtt\",\"srclang\":\"en\",\"kind\":\"subtitles\",\"label\":\"english\"}])\n",
10281017
"### in a conditional an empty list will evaluate `False`\n",
10291018
"This allows creating a while loop that runs until a list is empty\n",
10301019
"```python\n",
@@ -1111,7 +1100,6 @@
11111100
"# &nbsp;\n",
11121101
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
11131102
"## Delete a specific object from a list with `.remove()`\n",
1114-
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( http://edxinteractivepage.blob.core.windows.net/edxpages/f7cff1a7-5601-48a1-95a6-fd1fdfabd20e.html?details=[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/31fadf38-670c-4ba9-aa68-1934db459c4d/Unit2_Section2.4d-Removing_Object_from_List.ism/manifest\",\"type\":\"application/vnd.ms-sstr+xml\"}],[{\"src\":\"http://jupyternootbookwams.streaming.mediaservices.windows.net/31fadf38-670c-4ba9-aa68-1934db459c4d/Unit2_Section2.4d-Removing_Object_from_List.vtt\",\"srclang\":\"en\",\"kind\":\"subtitles\",\"label\":\"english\"}])\n",
11151103
"### `.remove(object)` removes the 1st item that matches\n",
11161104
"\n",
11171105
"```python\n",
@@ -1147,7 +1135,9 @@
11471135
{
11481136
"cell_type": "code",
11491137
"execution_count": null,
1150-
"metadata": {},
1138+
"metadata": {
1139+
"scrolled": true
1140+
},
11511141
"outputs": [],
11521142
"source": [
11531143
"# [ ] review and run example\n",
@@ -1205,7 +1195,7 @@
12051195
"cell_type": "markdown",
12061196
"metadata": {},
12071197
"source": [
1208-
"[Terms of use](http://go.microsoft.com/fwlink/?LinkID=206977) &nbsp; [Privacy & cookies](https://go.microsoft.com/fwlink/?LinkId=521839) &nbsp; © 2017 Microsoft"
1198+
"© 2017 Microsoft adapted with permission by Dominic Thomas"
12091199
]
12101200
}
12111201
],

0 commit comments

Comments
 (0)