Skip to content

Commit 5fecb84

Browse files
committed
Remove cell outputs
1 parent af9e668 commit 5fecb84

File tree

1 file changed

+15
-91
lines changed

1 file changed

+15
-91
lines changed

L6/errors.ipynb

+15-91
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,13 @@
3838
},
3939
{
4040
"cell_type": "code",
41-
"execution_count": 1,
41+
"execution_count": null,
4242
"metadata": {
4343
"tags": [
4444
"raises-exception"
4545
]
4646
},
47-
"outputs": [
48-
{
49-
"ename": "SyntaxError",
50-
"evalue": "unterminated string literal (detected at line 4) (2231829726.py, line 4)",
51-
"output_type": "error",
52-
"traceback": [
53-
"\u001b[0;36m Cell \u001b[0;32mIn[1], line 4\u001b[0;36m\u001b[0m\n\u001b[0;31m print(f\"A wind speed of {wind_speed_km} km/hr is {wind_speed_ms} m/s.)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m unterminated string literal (detected at line 4)\n"
54-
]
55-
}
56-
],
47+
"outputs": [],
5748
"source": [
5849
"wind_speed_km = 50\n",
5950
"wind_speed_ms = wind_speed_km * 1000 / 3600\n",
@@ -79,26 +70,13 @@
7970
},
8071
{
8172
"cell_type": "code",
82-
"execution_count": 2,
73+
"execution_count": null,
8374
"metadata": {
8475
"tags": [
8576
"raises-exception"
8677
]
8778
},
88-
"outputs": [
89-
{
90-
"ename": "TypeError",
91-
"evalue": "unsupported operand type(s) for /: 'str' and 'int'",
92-
"output_type": "error",
93-
"traceback": [
94-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
95-
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
96-
"Cell \u001b[0;32mIn[2], line 5\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m speed \u001b[38;5;241m*\u001b[39m \u001b[38;5;241m1000\u001b[39m \u001b[38;5;241m/\u001b[39m \u001b[38;5;241m3600\u001b[39m\n\u001b[1;32m 4\u001b[0m wind_speed_km \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m30\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[0;32m----> 5\u001b[0m wind_speed_ms \u001b[38;5;241m=\u001b[39m \u001b[43mconvert_wind_speed\u001b[49m\u001b[43m(\u001b[49m\u001b[43mwind_speed_km\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mA wind speed of \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mwind_speed_km\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m km/hr is \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mwind_speed_ms\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m m/s.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
97-
"Cell \u001b[0;32mIn[2], line 2\u001b[0m, in \u001b[0;36mconvert_wind_speed\u001b[0;34m(speed)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mconvert_wind_speed\u001b[39m(speed):\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mspeed\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;241;43m1000\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;241;43m/\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;241;43m3600\u001b[39;49m\n",
98-
"\u001b[0;31mTypeError\u001b[0m: unsupported operand type(s) for /: 'str' and 'int'"
99-
]
100-
}
101-
],
79+
"outputs": [],
10280
"source": [
10381
"def convert_wind_speed(speed):\n",
10482
" return speed * 1000 / 3600\n",
@@ -139,7 +117,7 @@
139117
},
140118
{
141119
"cell_type": "code",
142-
"execution_count": 3,
120+
"execution_count": null,
143121
"metadata": {},
144122
"outputs": [],
145123
"source": [
@@ -148,25 +126,13 @@
148126
},
149127
{
150128
"cell_type": "code",
151-
"execution_count": 4,
129+
"execution_count": null,
152130
"metadata": {
153131
"tags": [
154132
"raises-exception"
155133
]
156134
},
157-
"outputs": [
158-
{
159-
"ename": "IndexError",
160-
"evalue": "list index out of range",
161-
"output_type": "error",
162-
"traceback": [
163-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
164-
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
165-
"Cell \u001b[0;32mIn[4], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mcities\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m5\u001b[39;49m\u001b[43m]\u001b[49m\n",
166-
"\u001b[0;31mIndexError\u001b[0m: list index out of range"
167-
]
168-
}
169-
],
135+
"outputs": [],
170136
"source": [
171137
"cities[5]"
172138
]
@@ -189,25 +155,13 @@
189155
},
190156
{
191157
"cell_type": "code",
192-
"execution_count": 5,
158+
"execution_count": null,
193159
"metadata": {
194160
"tags": [
195161
"raises-exception"
196162
]
197163
},
198-
"outputs": [
199-
{
200-
"ename": "NameError",
201-
"evalue": "name 'stations' is not defined",
202-
"output_type": "error",
203-
"traceback": [
204-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
205-
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
206-
"Cell \u001b[0;32mIn[5], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m station_id \u001b[38;5;241m=\u001b[39m \u001b[43mstations\u001b[49m[\u001b[38;5;241m1\u001b[39m]\n",
207-
"\u001b[0;31mNameError\u001b[0m: name 'stations' is not defined"
208-
]
209-
}
210-
],
164+
"outputs": [],
211165
"source": [
212166
"station_id = stations[1]"
213167
]
@@ -230,22 +184,13 @@
230184
},
231185
{
232186
"cell_type": "code",
233-
"execution_count": 7,
187+
"execution_count": null,
234188
"metadata": {
235189
"tags": [
236190
"raises-exception"
237191
]
238192
},
239-
"outputs": [
240-
{
241-
"ename": "IndentationError",
242-
"evalue": "unindent does not match any outer indentation level (<tokenize>, line 3)",
243-
"output_type": "error",
244-
"traceback": [
245-
"\u001b[0;36m File \u001b[0;32m<tokenize>:3\u001b[0;36m\u001b[0m\n\u001b[0;31m print(city)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m unindent does not match any outer indentation level\n"
246-
]
247-
}
248-
],
193+
"outputs": [],
249194
"source": [
250195
"for city in cities:\n",
251196
" city = city + \" is a city in Europe\"\n",
@@ -254,22 +199,13 @@
254199
},
255200
{
256201
"cell_type": "code",
257-
"execution_count": 8,
202+
"execution_count": null,
258203
"metadata": {
259204
"tags": [
260205
"raises-exception"
261206
]
262207
},
263-
"outputs": [
264-
{
265-
"ename": "IndentationError",
266-
"evalue": "expected an indented block after 'for' statement on line 1 (1297196788.py, line 2)",
267-
"output_type": "error",
268-
"traceback": [
269-
"\u001b[0;36m Cell \u001b[0;32mIn[8], line 2\u001b[0;36m\u001b[0m\n\u001b[0;31m city = city + \" is a city in Europe\"\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block after 'for' statement on line 1\n"
270-
]
271-
}
272-
],
208+
"outputs": [],
273209
"source": [
274210
"for city in cities:\n",
275211
"city = city + \" is a city in Europe\"\n",
@@ -294,25 +230,13 @@
294230
},
295231
{
296232
"cell_type": "code",
297-
"execution_count": 9,
233+
"execution_count": null,
298234
"metadata": {
299235
"tags": [
300236
"raises-exception"
301237
]
302238
},
303-
"outputs": [
304-
{
305-
"ename": "TypeError",
306-
"evalue": "unsupported operand type(s) for /: 'str' and 'int'",
307-
"output_type": "error",
308-
"traceback": [
309-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
310-
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
311-
"Cell \u001b[0;32mIn[9], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mcities\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m/\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;241;43m5\u001b[39;49m\n",
312-
"\u001b[0;31mTypeError\u001b[0m: unsupported operand type(s) for /: 'str' and 'int'"
313-
]
314-
}
315-
],
239+
"outputs": [],
316240
"source": [
317241
"cities[0] / 5"
318242
]

0 commit comments

Comments
 (0)