|
18 | 18 | "\n", |
19 | 19 | "Python is popular because it is easy to read, has a large ecosystem of scientific libraries, and works well with modern AI tools.\n", |
20 | 20 | "\n", |
21 | | - "## Installing Python\n", |
| 21 | + "## 4.2.1 Installing Python\n", |
22 | 22 | "\n", |
23 | 23 | "The easiest way to get started is by installing:\n", |
24 | 24 | "\n", |
|
34 | 34 | "\n", |
35 | 35 | "> **Video:** Installation walkthrough [for Windows](https://www.youtube.com/watch?v=YKSpANU8jPE), [for Mac](https://www.youtube.com/watch?v=utVZYVJSTZA).\n", |
36 | 36 | "\n", |
37 | | - "## Your First Python Program\n", |
| 37 | + "## 4.2.2 Write Your First Python Program\n", |
38 | 38 | "\n", |
39 | 39 | "Python scripts are saved with `.py` extension. You can create a file named `hello.py` write `print(\"Hello, world!\")` in it. \n", |
40 | 40 | "\n", |
|
60 | 60 | "id": "2", |
61 | 61 | "metadata": {}, |
62 | 62 | "source": [ |
63 | | - "# Integrated Development Environments (IDEs)\n", |
| 63 | + "### Integrated development environments (IDEs)\n", |
64 | 64 | "\n", |
65 | 65 | "While Python code can be written in a simple text editor, most programmers use an **Integrated Development Environment (IDE)**. An IDE provides tools that make coding easier, including syntax highlighting, code completion, debugging, and project management.\n", |
66 | 66 | "\n", |
|
79 | 79 | "> **Video:** Getting started with VS code - \n", |
80 | 80 | "> [Link](https://www.youtube.com/watch?v=D2cwvpJSBX4)\n", |
81 | 81 | "\n", |
82 | | - "### AI-Assisted Coding with Cursor\n", |
| 82 | + "### AI-assisted coding with cursor\n", |
83 | 83 | "\n", |
84 | 84 | "In recent years, AI-powered code editors have become popular tools for learning and programming. One example is **Cursor**, an editor built on top of VS Code that includes AI features for writing, explaining, and debugging code.\n", |
85 | 85 | "\n", |
|
99 | 99 | "\n", |
100 | 100 | "Now let's shift gears and take a much more detailed look into writing python codes.\n", |
101 | 101 | "\n", |
102 | | - "## Variables in python\n", |
| 102 | + "## 4.2.3 Variables in Python\n", |
103 | 103 | "\n", |
104 | 104 | "Variables are used to store information that can be referenced and manipulated later in a program. You can think of a variable as a labeled container that holds a value, such as a number, a piece of text, or a collection of data.\n", |
105 | 105 | "\n", |
|
144 | 144 | "id": "6", |
145 | 145 | "metadata": {}, |
146 | 146 | "source": [ |
147 | | - "## Basic Data Types\n", |
| 147 | + "## 4.2.4 Basic Data Types\n", |
148 | 148 | "\n", |
149 | 149 | "Every value stored in Python has a data type. The data type determines what kind of information is stored and what operations can be performed on it.\n", |
150 | 150 | "\n", |
|
171 | 171 | "is_significant = True\n", |
172 | 172 | "```\n", |
173 | 173 | "\n", |
174 | | - "## Basic Arithmetic\n", |
| 174 | + "## 4.2.5 Basic Arithmetic\n", |
175 | 175 | "\n", |
176 | 176 | "Python can perform mathematical calculations just like a calculator. Arithmetic operations are useful in many scientific applications, including data analysis, statistical calculations, unit conversions, and numerical simulations.\n", |
177 | 177 | "\n", |
|
208 | 208 | "id": "8", |
209 | 209 | "metadata": {}, |
210 | 210 | "source": [ |
211 | | - "## Data Structures\n", |
| 211 | + "## 4.2.6 Data Structures\n", |
212 | 212 | "\n", |
213 | 213 | "As programs become more complex, we often need to store and organize collections of data rather than individual values. **Data structures** are ways of organizing data so that it can be accessed, modified, and analyzed efficiently.\n", |
214 | 214 | "\n", |
|
244 | 244 | "id": "10", |
245 | 245 | "metadata": {}, |
246 | 246 | "source": [ |
247 | | - "## Dictionaries\n", |
| 247 | + "### Dictionaries\n", |
248 | 248 | "\n", |
249 | 249 | "Dictionaries are data structures that store information as **key-value pairs**. Instead of accessing values by their position (as in a list), values in a dictionary are accessed using a unique key.\n", |
250 | 250 | "\n", |
|
275 | 275 | "id": "12", |
276 | 276 | "metadata": {}, |
277 | 277 | "source": [ |
278 | | - "## Conditional Statements\n", |
| 278 | + "### Conditional Statements\n", |
279 | 279 | "\n", |
280 | 280 | "Conditional statements allow your program to make decisions based on whether a condition is true or false. They are commonly used in scientific analysis to filter data, apply thresholds, or trigger different actions depending on the results.\n", |
281 | 281 | "\n", |
|
302 | 302 | "id": "14", |
303 | 303 | "metadata": {}, |
304 | 304 | "source": [ |
305 | | - "## Loops\n", |
| 305 | + "## 4.2.7 Loops\n", |
306 | 306 | "\n", |
307 | 307 | "Loops allow you to repeat the same operation multiple times without rewriting code. This is especially useful when working with datasets, collections of genes, proteins, samples, or experimental measurements.\n", |
308 | 308 | "\n", |
|
355 | 355 | "id": "18", |
356 | 356 | "metadata": {}, |
357 | 357 | "source": [ |
358 | | - "## Functions\n", |
| 358 | + "## 4.2.8 Functions\n", |
359 | 359 | "\n", |
360 | 360 | "As programs grow larger, it becomes useful to group related code into reusable blocks called **functions**. Functions allow you to perform a specific task whenever needed without rewriting the same code multiple times.\n", |
361 | 361 | "\n", |
|
388 | 388 | "id": "20", |
389 | 389 | "metadata": {}, |
390 | 390 | "source": [ |
391 | | - "## Best Practices\n", |
| 391 | + "## 4.2.9 Python Best Practices\n", |
392 | 392 | "\n", |
393 | 393 | "* Use meaningful variable names.\n", |
394 | 394 | "* Write small, reusable functions.\n", |
|
398 | 398 | "* Use version control (Git) for larger projects.\n", |
399 | 399 | "\n", |
400 | 400 | "\n", |
401 | | - "## Importing Libraries\n", |
| 401 | + "## 4.2.10 Importing Libraries\n", |
402 | 402 | "\n", |
403 | 403 | "Python's power comes from its libraries. A library is a collection of pre-written code that provides additional functionality, allowing you to perform complex tasks without writing everything from scratch.\n", |
404 | 404 | "\n", |
|
451 | 451 | "id": "24", |
452 | 452 | "metadata": {}, |
453 | 453 | "source": [ |
454 | | - "## Working with Data\n", |
| 454 | + "## 4.2.11 Working with Data\n", |
455 | 455 | "\n", |
456 | 456 | "One of the main reasons scientists use Python is its ability to work efficiently with data. Experimental results, survey responses, genomic datasets, and simulation outputs are often stored in tabular formats such as CSV (Comma-Separated Values) files.\n", |
457 | 457 | "\n", |
|
486 | 486 | "id": "26", |
487 | 487 | "metadata": {}, |
488 | 488 | "source": [ |
489 | | - "## Plotting Data\n", |
| 489 | + "### Plotting Data\n", |
490 | 490 | "\n", |
491 | 491 | "Visualizing data is an important part of scientific analysis. Graphs and charts can help reveal patterns, trends, outliers, and relationships that may not be obvious when looking at raw numbers alone.\n", |
492 | 492 | "\n", |
|
518 | 518 | "id": "28", |
519 | 519 | "metadata": {}, |
520 | 520 | "source": [ |
521 | | - "## Learn More\n", |
| 521 | + "## 4.2.12 Additional Resources\n", |
522 | 522 | "\n", |
523 | 523 | "* [NumPy basics](https://www.youtube.com/watch?v=QUT1VHiLmmI)\n", |
524 | 524 | "* [Pandas basics](https://www.youtube.com/watch?v=EXIgjIBu4EU)\n", |
|
0 commit comments