|
106 | 106 | "source": [
|
107 | 107 | "[Python](https://en.wikipedia.org/wiki/Python_(programming_language)) is a programming language that was developed in 1991 by \"Benevolent dictator for life\" Guido van Rossum.\n",
|
108 | 108 | "\n",
|
| 109 | + "<div style=\"text-align: center\">\n", |
| 110 | + " <img src=\"https://upload.wikimedia.org/wikipedia/commons/6/66/Guido_van_Rossum_OSCON_2006.jpg\" alt=\"Guido van Rossum\" width=\"25%\"/>\n", |
| 111 | + "</div>\n", |
| 112 | + "\n", |
109 | 113 | "Python is:\n",
|
110 | 114 | "\n",
|
111 | 115 | "- **Interpreted**: Programs are executed line by line by an interpreter instead of being compiled into machine code first.\n",
|
|
175 | 179 | },
|
176 | 180 | {
|
177 | 181 | "cell_type": "code",
|
178 |
| - "execution_count": 8, |
| 182 | + "execution_count": null, |
179 | 183 | "id": "1e0cc47a",
|
180 | 184 | "metadata": {},
|
181 | 185 | "outputs": [],
|
|
221 | 225 | "\n",
|
222 | 226 | " def action(self):\n",
|
223 | 227 | " # implement selecting a random action\n",
|
224 |
| - " raise NotImplementedError()\n", |
| 228 | + " raise NotImplementedError(\"TODO\")\n", |
225 | 229 | "\n",
|
226 | 230 | "def rock_paper_scissors(agent_a, agent_b):\n",
|
227 | 231 | " choice_a = agent_a.get_choice()\n",
|
|
231 | 235 | " agent_b.observe(choice_a)\n",
|
232 | 236 | "\n",
|
233 | 237 | " # implement game logic\n",
|
234 |
| - " raise NotImplementedError" |
| 238 | + " raise NotImplementedError(\"TODO\")" |
235 | 239 | ]
|
236 | 240 | },
|
237 | 241 | {
|
|
295 | 299 | },
|
296 | 300 | {
|
297 | 301 | "cell_type": "code",
|
298 |
| - "execution_count": 21, |
| 302 | + "execution_count": 1, |
299 | 303 | "id": "c539f499-e744-43b6-b6fc-eedc5c793f5b",
|
300 | 304 | "metadata": {},
|
301 | 305 | "outputs": [
|
302 | 306 | {
|
303 | 307 | "name": "stdout",
|
304 | 308 | "output_type": "stream",
|
305 | 309 | "text": [
|
306 |
| - "Collecting pyjokes\n", |
307 |
| - " Downloading pyjokes-0.8.3-py3-none-any.whl.metadata (3.4 kB)\n", |
308 |
| - "Downloading pyjokes-0.8.3-py3-none-any.whl (47 kB)\n", |
309 |
| - "Installing collected packages: pyjokes\n", |
310 |
| - "Successfully installed pyjokes-0.8.3\n" |
| 310 | + "Requirement already satisfied: pyjokes in /home/bjarne/miniconda3/envs/dsc-tutorials/lib/python3.12/site-packages (0.8.3)\n", |
| 311 | + "^C\n", |
| 312 | + "\u001b[31mERROR: Operation cancelled by user\u001b[0m\u001b[31m\n", |
| 313 | + "\u001b[0m" |
311 | 314 | ]
|
312 | 315 | }
|
313 | 316 | ],
|
314 | 317 | "source": [
|
| 318 | + "# shell assignment syntax\n", |
| 319 | + "# ! in jupyter cells allows you to execute shell commands\n", |
315 | 320 | "!pip install pyjokes"
|
316 | 321 | ]
|
317 | 322 | },
|
|
0 commit comments