|
16 | 16 | "id": "fc45f0ff-5ff8-47ba-a839-f8fdf55c7a9f", |
17 | 17 | "metadata": {}, |
18 | 18 | "source": [ |
19 | | - "There are several ways to execute code." |
| 19 | + "There are several ways to execute (also called \"run\") Python code." |
20 | 20 | ] |
21 | 21 | }, |
22 | 22 | { |
|
72 | 72 | "\n", |
73 | 73 | "> A read–eval–print loop (REPL) is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user.\n", |
74 | 74 | "\n", |
75 | | - "If type `uv run python` in our terminal and hit enter, we get into the built-in python REPL." |
| 75 | + "If we type `uv run python` in our terminal and hit enter, we get into the built-in python REPL." |
76 | 76 | ] |
77 | 77 | }, |
78 | 78 | { |
|
139 | 139 | "metadata": {}, |
140 | 140 | "source": [ |
141 | 141 | "- `?`\n", |
142 | | - "- `! <COMMAND>`: Call the system COMMAND, eg `!ls` to list contents.\n", |
| 142 | + "- `! <COMMAND>`: Call the system COMMAND, eg `!ls` to list contents of current directory.\n", |
143 | 143 | "- `%run`: Run a file inside IPython as a program. \n", |
144 | 144 | "- `%time`: Time execution of a Python statement or expression.\n", |
145 | 145 | "- `%timeit`: Time execution of a Python statement or expression." |
|
158 | 158 | "3) Multiply 3 twenty two times\n", |
159 | 159 | "4) Print your name using the `print` function\n", |
160 | 160 | "5) Add two strings, e.g. \"hello\" + \"world\"\n", |
161 | | - "6) Run the file `hello.py` inside the REPL\n", |
| 161 | + "6) Create the file `src/pycourse/main.py` that prints your name and run it inside the IPython REPL\n", |
162 | 162 | "7) Same but print it's execution time" |
163 | 163 | ] |
164 | 164 | }, |
|
172 | 172 | "There are many options out there.\n", |
173 | 173 | "Do not spend too much time deciding which to pick, you can always change your choice later. \n", |
174 | 174 | "[VS-Code](https://code.visualstudio.com/) is a reasonable general choice as of today, it is free and widely adopted.\n", |
175 | | - "For a user experience more similar to matlab and oriented to scientific computing you can check out [Spyder](https://www.spyder-ide.org)." |
| 175 | + "For a user experience more similar to matlab or R-studio and oriented to scientific computing you can check out [Spyder](https://www.spyder-ide.org)." |
176 | 176 | ] |
177 | 177 | }, |
178 | 178 | { |
|
183 | 183 | "## Jupyter Notebook\n", |
184 | 184 | "Notebooks run on the browser and are a way to mix code with other kinds of data, such as images, videos or widgets.\n", |
185 | 185 | "They are a very useful tool for explorative analysis.\n", |
186 | | - "If you ever used something like Mathematica you'll be already familiar with them.\n", |
| 186 | + "If you ever used something like [Mathematica](https://www.wolfram.com/mathematica/) you'll be already familiar with them.\n", |
187 | 187 | "\n", |
188 | 188 | "There are several versions of notebooks, we are going to use [JupyterLab](https://jupyterlab.readthedocs.io/en/latest/).\n", |
189 | 189 | "Let's install it:\n", |
|
197 | 197 | "```bash\n", |
198 | 198 | "mkdir noteboooks\n", |
199 | 199 | "```\n", |
| 200 | + "So far your project should look like this:\n", |
200 | 201 | "\n", |
| 202 | + "" |
| 203 | + ] |
| 204 | + }, |
| 205 | + { |
| 206 | + "cell_type": "markdown", |
| 207 | + "id": "339a9009-15aa-4180-8770-1a165210a3d8", |
| 208 | + "metadata": {}, |
| 209 | + "source": [ |
201 | 210 | "Launch a jupyterlab session:\n", |
202 | 211 | "\n", |
203 | 212 | "```bash\n", |
|
233 | 242 | "name": "python", |
234 | 243 | "nbconvert_exporter": "python", |
235 | 244 | "pygments_lexer": "ipython3", |
236 | | - "version": "3.10.13" |
| 245 | + "version": "3.13.3" |
237 | 246 | } |
238 | 247 | }, |
239 | 248 | "nbformat": 4, |
|
0 commit comments