|
53 | 53 | "source": [
|
54 | 54 | "## Recap\n",
|
55 | 55 | "\n",
|
56 |
| - "If the following concepts are unclear to you, we recommend you attend [Python Fundamentals](https://dlab.berkeley.edu/training/upcoming-workshops) first!\n", |
| 56 | + "In [Python Fundamentals](https://dlab.berkeley.edu/training/upcoming-workshops), we covered the following:\n", |
57 | 57 | "\n",
|
58 | 58 | "**Variables** are names attached to particular values.\n",
|
59 | 59 | "* To create a variable, you assign it a value and then start using it.\n",
|
60 | 60 | "* Assignment is done with a single equals sign `=`.\n",
|
61 | 61 | "* When we write `n = 300`, we are assigning 300 to the variable `n` via the assignment operator `=`.\n",
|
62 | 62 | "\n",
|
| 63 | + "**Data types** are classifications of data. \n", |
| 64 | + "* There are a lot of data types in Python, such as integers (`int`) and strings (`str`).\n", |
| 65 | + "* Some data types are called **data structures** because they allow us to organize data. Lists (`list`) and dictionaries (`dict`) are two examples.\n", |
| 66 | + "* You can index a list using square brackets, for instance `some_list[0]` to get the first item from `some_list`.\n", |
| 67 | + "\n", |
63 | 68 | "**Functions** perform actions on \"things\".\n",
|
64 | 69 | "* `print()` `len()`, and `type()` are some of the most commonly used functions.\n",
|
65 | 70 | "* You can identify a function by its trailing round parentheses. \n",
|
66 | 71 | "\n",
|
67 | 72 | "**Arguments** are the \"things\" we perform the action on within a function.\n",
|
68 | 73 | "* Arguments go inside the trailing parentheses of functions when we call them. \n",
|
69 | 74 | "* For instance, in `print('D-Lab')`, the string `D-Lab` is an argument.\n",
|
70 |
| - "* Arguments are also called inputs or parameters.\n", |
| 75 | + "* Arguments are also called inputs or **parameters**.\n", |
71 | 76 | "\n",
|
72 | 77 | "**Methods** are type-specific functions.\n",
|
73 | 78 | "* Different data types and structures have functions that only apply to them.\n",
|
|
0 commit comments