Skip to content

Commit bf03ebc

Browse files
committed
Remove {.python} and {.output} from markdown cells - breaks rendering
sed -i '' 's/ {.python}//' *.ipynb sed -i '' 's/ {.output}//' *.ipynb
1 parent 22cdc7f commit bf03ebc

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

01-intro.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@
864864
"\n",
865865
"Draw diagrams showing what variables refer to what values after each statement in the following program:\n",
866866
"\n",
867-
"~~~ {.python}\n",
867+
"~~~\n",
868868
"mass = 47.5\n",
869869
"age = 122\n",
870870
"mass = mass * 2.0\n",
@@ -875,7 +875,7 @@
875875
"\n",
876876
"What does the following program print out?\n",
877877
"\n",
878-
"~~~ {.python}\n",
878+
"~~~\n",
879879
"first, second = 'Grace', 'Hopper'\n",
880880
"third, fourth = second, first\n",
881881
"print third, fourth\n",
@@ -886,13 +886,13 @@
886886
"A section of a data frame is called a [slice](reference.html#slice).\n",
887887
"We can take slices of character strings as well:\n",
888888
"\n",
889-
"~~~ {.python}\n",
889+
"~~~\n",
890890
"element = 'oxygen'\n",
891891
"print 'first three characters:', element[0:3]\n",
892892
"print 'last three characters:', element[3:6]\n",
893893
"~~~\n",
894894
"\n",
895-
"~~~ {.output}\n",
895+
"~~~\n",
896896
"first three characters: oxy\n",
897897
"last three characters: gen\n",
898898
"~~~\n",

02-loops.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"to repeat an operation---in this case, printing---once for each thing in a collection.\n",
100100
"The general form of a loop is:\n",
101101
"\n",
102-
"~~~ {.python}\n",
102+
"~~~\n",
103103
"for variable in collection:\n",
104104
" do things with variable\n",
105105
"~~~\n",
@@ -200,7 +200,7 @@
200200
" Using `range`,\n",
201201
" write a loop that uses `range` to print the first 3 natural numbers:\n",
202202
"\n",
203-
" ~~~ {.python}\n",
203+
" ~~~\n",
204204
" 1\n",
205205
" 2\n",
206206
" 3\n",
@@ -224,7 +224,7 @@
224224
"\n",
225225
" Exponentiation is built into Python:\n",
226226
"\n",
227-
" ~~~ {.python}\n",
227+
" ~~~\n",
228228
" print 5 ** 3\n",
229229
" 125\n",
230230
" ~~~"

03-lists.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@
195195
"\n",
196196
"Use a for-loop to convert the string \"hello\" into a list of letters:\n",
197197
"\n",
198-
"~~~ {.python}\n",
198+
"~~~\n",
199199
"[\"h\", \"e\", \"l\", \"l\", \"o\"]\n",
200200
"~~~\n",
201201
"Hint: You can create an empty list like this:\n",
202202
"\n",
203-
"~~~ {.python}\n",
203+
"~~~\n",
204204
"my_list = []\n",
205205
"~~~"
206206
]

05-choices.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
"3. C\n",
234234
"4. B and C\n",
235235
"\n",
236-
"~~~ {.python}\n",
236+
"~~~\n",
237237
"if 4 > 5:\n",
238238
" print 'A'\n",
239239
"elif 4 == 5:\n",
@@ -265,7 +265,7 @@
265265
"explain what the rule is for which values are considered true and which are considered false.\n",
266266
"(Note that if the body of a conditional is a single statement, we can write it on the same line as the `if`.)\n",
267267
"\n",
268-
"~~~ {.python}\n",
268+
"~~~\n",
269269
"if '': print 'empty string is true'\n",
270270
"if 'word': print 'word is true'\n",
271271
"if []: print 'empty list is true'\n",
@@ -314,13 +314,13 @@
314314
"Python (and most other languages in the C family) provides [in-place operators](reference.html#in-place-operator)\n",
315315
"that work like this:\n",
316316
"\n",
317-
"~~~ {.python}\n",
317+
"~~~\n",
318318
"x = 1 # original value\n",
319319
"x += 1 # add one to x, assigning result back to x\n",
320320
"x *= 3 # multiply x by 3\n",
321321
"print x\n",
322322
"~~~\n",
323-
"~~~ {.output}\n",
323+
"~~~\n",
324324
"6\n",
325325
"~~~\n",
326326
"\n",
@@ -346,7 +346,7 @@
346346
"\n",
347347
"Explain what the overall effect of this code is:\n",
348348
"\n",
349-
"~~~ {.python}\n",
349+
"~~~\n",
350350
"left = 'L'\n",
351351
"right = 'R'\n",
352352
"\n",
@@ -357,7 +357,7 @@
357357
"\n",
358358
"Compare it to:\n",
359359
"\n",
360-
"~~~ {.python}\n",
360+
"~~~\n",
361361
"left, right = right, left\n",
362362
"~~~\n",
363363
"\n",

06-functions.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@
853853
"and returns a new string that has the wrapper character at the beginning and end of the original.\n",
854854
"A call to your function should look like this:\n",
855855
"\n",
856-
"~~~ {.python}\n",
856+
"~~~\n",
857857
"print fence('name', '*')\n",
858858
"*name*\n",
859859
"~~~"
@@ -881,7 +881,7 @@
881881
"that returns a string made up of just the first and last characters of its input.\n",
882882
"A call to your function should look like this:\n",
883883
"\n",
884-
"~~~ {.python}\n",
884+
"~~~\n",
885885
"print outer('helium')\n",
886886
"hm\n",
887887
"~~~"
@@ -904,7 +904,7 @@
904904
"\n",
905905
"What does the following piece of code display when run - and why?\n",
906906
"\n",
907-
"~~~ {.python}\n",
907+
"~~~\n",
908908
"f = 0\n",
909909
"k = 0\n",
910910
"\n",

0 commit comments

Comments
 (0)