Skip to content

Commit 7839d45

Browse files
committed
Update basic notebooks
Fixed typos
1 parent cee704d commit 7839d45

29 files changed

+230
-250
lines changed

1_Basics/02.1_Python_Terms.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
"id": "864e8619",
268268
"metadata": {},
269269
"source": [
270-
"Variables that reference the same object... are the same."
270+
"Variables that reference the same object are... the same."
271271
]
272272
},
273273
{
@@ -320,7 +320,7 @@
320320
"id": "f367a47d",
321321
"metadata": {},
322322
"source": [
323-
"However, variables that may look the same, but reference different objects... are different."
323+
"However, variables that may look the same, but reference different objects are... different."
324324
]
325325
},
326326
{
@@ -1125,7 +1125,7 @@
11251125
"name": "python",
11261126
"nbconvert_exporter": "python",
11271127
"pygments_lexer": "ipython3",
1128-
"version": "3.11.9"
1128+
"version": "3.12.2"
11291129
}
11301130
},
11311131
"nbformat": 4,

1_Basics/03_Data_Types.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
"cell_type": "markdown",
251251
"metadata": {},
252252
"source": [
253-
"You can also use functions inside of other functions"
253+
"You can also use functions inside of other functions."
254254
]
255255
},
256256
{
@@ -351,9 +351,9 @@
351351
"source": [
352352
"You can also check to see if a variable is the type you think it is. Using `isinstance()`. It has two arguments: \n",
353353
"1. *Object* - what you want to check\n",
354-
"2. *Type* - a type (what you want to check to see the object is)\n",
354+
"2. *Type* - a type (what you want to use to see the object is)\n",
355355
"\n",
356-
"For example if I wanted to check if the `job_id` is a `float` type. If it is the the type you put it will return `True` if not, it will return `False`. "
356+
"For example, if I wanted to check if the `job_id` is a `float` type. If it is the type you put in, it will return `True` if not, it will return `False`. "
357357
]
358358
},
359359
{
@@ -445,7 +445,7 @@
445445
"\n",
446446
"A \"method\" in Python is like a tool that performs a specific task on or with an object. \n",
447447
"\n",
448-
"For instance, a string object has a method `.upper()`, which you can use like `your_string.upper()`. This takes your_string and turns all its letters to uppercase. It's like asking the string to shout itself."
448+
"For instance, a string object has a method `.upper()`, which you can use like `your_string.upper()`. This takes `your_string` and turns all its letters to uppercase. It's like asking the string to explain itself."
449449
]
450450
},
451451
{

1_Basics/04_Strings.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@
652652
"source": [
653653
"#### Magic Methods (aka Dunder Methods)\n",
654654
"\n",
655-
" Dunder methods (short for \"double underscore methods\") are special functions that override behavior for Python objects.\n",
655+
" **Dunder methods** (short for \"double underscore methods\") are special functions that override behavior for Python objects.\n",
656656
"\n",
657657
" ##### Adding"
658658
]
@@ -733,7 +733,7 @@
733733
"source": [
734734
"#### Length\n",
735735
"\n",
736-
"Not all magic method use operators(e.g., `+`), some use other functions like `len()`"
736+
"Not all magic method use operators(e.g., `+`), some use other functions like `len()`."
737737
]
738738
},
739739
{

1_Basics/05_String_Formatting.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"cell_type": "markdown",
2222
"metadata": {},
2323
"source": [
24-
"In Python there's a few different options for formatting our output\n",
24+
"In Python there's a few different options for formatting our output:\n",
2525
"\n",
2626
"| Method | Syntax | Example (prints \"Hello Luke\") | Description |\n",
2727
"|-----------------|------------------------------------------------|------------------------------------------------|-------------------------------------------------------------------|\n",
@@ -32,7 +32,7 @@
3232
"| join() | `'separator'.join([string, variable])` | `', '.join(['Hello', name])` | Joins a list of strings into a single string with a separator. |\n",
3333
"\n",
3434
"\n",
35-
"For our examples we'll be printing out a `role` and/or `skill`"
35+
"For our examples we'll be printing out a `role` and/or `skill`."
3636
]
3737
},
3838
{
@@ -87,7 +87,7 @@
8787
"metadata": {},
8888
"source": [
8989
"##### NOTE: For all examples we are going to omit the `print()` function for ease of readability \n",
90-
"e.g., `print('Role: ' + role)`"
90+
"e.g. `print('Role: ' + role)`"
9191
]
9292
},
9393
{
@@ -123,7 +123,7 @@
123123
"cell_type": "markdown",
124124
"metadata": {},
125125
"source": [
126-
"##### NOTE: This is the last time you'll see us use this option as it's hard to read IMO"
126+
"##### NOTE: This is the last time you'll see us use this option as it's hard to read IMO (in my opinion)"
127127
]
128128
},
129129
{
@@ -186,7 +186,7 @@
186186
"cell_type": "markdown",
187187
"metadata": {},
188188
"source": [
189-
"Or you can refer to your variable substitutions similar to f-strings... I still prefer f-strings tho"
189+
"Or you can refer to your variable substitutions similar to f-strings... I still prefer f-strings tho."
190190
]
191191
},
192192
{

1_Basics/06_Operators_Part_1.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,10 @@
697697
"source": [
698698
"#### Order of Operations\n",
699699
"\n",
700-
"1. **Parentheses**: Anything in parentheses is executed first. \n",
701-
"2. **Exponents**: Operations involving exponents (including roots, indicated as fractional exponents). \n",
702-
"3. **Multiplication and Division**: Processed from left to right. \n",
703-
"4. **Addition and Subtraction**: Also processed from left to right. \n"
700+
"1. **Parentheses**: Anything in parentheses is executed first\n",
701+
"2. **Exponents**: Operations involving exponents (including roots, indicated as fractional exponents) \n",
702+
"3. **Multiplication and Division**: Processed from left to right\n",
703+
"4. **Addition and Subtraction**: Also processed from left to right\n"
704704
]
705705
},
706706
{

1_Basics/07_Conditional_Statements.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"\n",
105105
"Explanation:\n",
106106
"* The code checks the desired applicant's skill matches the required skill for the data analyst job posting using an if statement.\n",
107-
"* If there is a match, the `result` variable is updated to indicate that a the skill matches.\n",
107+
"* If there is a match, the `result` variable is updated to indicate that the skill matches.\n",
108108
"* Finally, the result is printed out."
109109
]
110110
},
@@ -259,7 +259,7 @@
259259
"Explanation: \n",
260260
"* Checks if `applicant_skill` matches `job_skill` and if the specific conditions based on `years_experience`:\n",
261261
" * Using `if` see if it's less than 2 years of experience with the skill, then it shows a Junior Data Analyst position.\n",
262-
" * Using `elif` see if it's 2 to 5 years of experience with the skill, then it shows a a Mid-level Data Analyst position.\n",
262+
" * Using `elif` see if it's 2 to 5 years of experience with the skill, then it shows a Mid-level Data Analyst position.\n",
263263
" * Using `elif` see if it's more than 5 years of experience with the skill, then it shows Senior Data Analyst position.\n",
264264
"* Updates the `result` variable to reflect the matching job level.\n",
265265
"* Outputs the final result."
@@ -338,7 +338,7 @@
338338
"* Checks if `applicant_skill` matches `job_skill` and if the specific conditions based on `years_experience`:\n",
339339
" * Must have at least 2 years of experience (`years_experience >= 2`).\n",
340340
"* If the condition is met, updates the `result` variable to indicate that the experience and skill matches the requirements for the Data Analyst position.\n",
341-
"* If the condition is *not* met, updates `result` to suggest to check the qualifications or the require skill for the Data Analyst position.\n",
341+
"* If the condition is *not* met, updates `result` to check the qualifications or the required skill for the Data Analyst position.\n",
342342
"* Prints the result."
343343
]
344344
},
@@ -397,8 +397,8 @@
397397
"\n",
398398
"### Example\n",
399399
"\n",
400-
"* We create an `if` statement.\n",
401-
"* Use pass within the statement so it doesn't run an error."
400+
"* We create an `if` statement\n",
401+
"* Use pass within the statement, so it doesn't run an error"
402402
]
403403
},
404404
{

1_Basics/08_Lists.ipynb

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
"## Notes\n",
4747
"\n",
4848
"- Used to store multiple ordered items in a single variable.\n",
49-
"- Created using `[` and `]`\n",
49+
"- Created using `[` and `]`.\n",
5050
"- We won't be going into everything that we can do in a list.\n",
5151
"- Common data types in lists: Integer, Float, String, Boolean, List, Dictionary, Tuple, Set, Object.\n",
52-
"- You can include lists within lists. \n",
53-
"- Easy to store information \n",
52+
"- You can include lists within lists.\n",
53+
"- Easy to store information. \n",
5454
"\n",
5555
"## Importance\n",
5656
"\n",
@@ -147,7 +147,7 @@
147147
"source": [
148148
"### Change Value\n",
149149
"\n",
150-
"To change the value of a specific item, refer to its index number. Below we will change the 'tableau' skill (at index 1) to 'bigquery'."
150+
"To change the value of a specific item, refer to its index number. Below we will change the 'tableau' skill (at index `1`) to 'bigquery'."
151151
]
152152
},
153153
{
@@ -195,10 +195,10 @@
195195
"source": [
196196
"### Methods\n",
197197
"\n",
198-
"* **Methods** are functions that belong to an object. \n",
198+
"* **Methods** are functions that belong to an object\n",
199199
" * We learned a little about functions before but a reminder: it's a block of code designed to do a specific task.\n",
200-
" * In a bit we'll be creating our own functions. But now we'll just be using functions given to us. \n",
201-
"* But all you need to know right now is that **methods** these have this notation: `object.method()`.\n",
200+
" * In a bit we'll be creating our own functions. But now we'll just be using functions given to us.\n",
201+
"* But all you need to know right now is that **methods** have this notation: `object.method()`\n",
202202
" "
203203
]
204204
},
@@ -210,7 +210,7 @@
210210
"source": [
211211
"### Append()\n",
212212
"\n",
213-
"If you need to add an item at the end of a list you can use `append()` method. We'll add in 'looker' as a skill at the end of our list.\n",
213+
"If you need to add an item at the end of a list you can use `append()` method. Below we'll add in 'looker' as a skill at the end of our list.\n",
214214
"\n",
215215
"We'll get into methods more later."
216216
]
@@ -393,7 +393,7 @@
393393
"source": [
394394
"### Remove()\n",
395395
"\n",
396-
"To remove a specific item use the `remove()` method. If we want to remove the 'looker' skill."
396+
"To remove a specific item use the `remove()` method. Let's remove the 'looker' skill."
397397
]
398398
},
399399
{
@@ -588,11 +588,11 @@
588588
"source": [
589589
"### Slicing Lists\n",
590590
"\n",
591-
"Slicing Syntax \n",
592-
"Syntax: `list[start:end:step]` \n",
593-
"`start`: The starting index (inclusive). \n",
594-
"`end`: The ending index (exclusive). \n",
595-
"`step`: Steps to take between items. "
591+
"Slicing Syntax:\n",
592+
"* Syntax: `list[start:end:step]` \n",
593+
" * `start`: The starting index (inclusive)\n",
594+
" * `end`: The ending index (exclusive)\n",
595+
" * `step`: Steps to take between items"
596596
]
597597
},
598598
{
@@ -623,8 +623,9 @@
623623
"cell_type": "markdown",
624624
"metadata": {},
625625
"source": [
626-
"`start` has a default value of `0` and `stop` has a default value of the last value in the list\n",
627-
"Therefore: you can omit either when one of these values"
626+
"`start` has a default value of `0` and `stop` has a default value of the last value in the list.\n",
627+
"\n",
628+
"Therefore: you can omit either when one of these values."
628629
]
629630
},
630631
{
@@ -784,7 +785,7 @@
784785
"source": [
785786
"### Extend Unpack List\n",
786787
"\n",
787-
"To extend unpack, which is when you assign a subset of elements to a variable as a list. "
788+
"To extend unpack a list, is when you assign a subset of elements to a variable as a list. "
788789
]
789790
},
790791
{

1_Basics/10_Sets.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@
4949
" * unorderd\n",
5050
" * Unchangeable\n",
5151
" * Unindexed\n",
52-
"* Set *items* are unchangeable but you can still remove items and add new items.\n",
52+
"* Set *items* are unchangeable but you can still remove items and add new items\n",
5353
"\n",
5454
"## Importance\n",
5555
"\n",
5656
"Employed for removing duplicates and for set operations, aiding in data cleaning and preparation.\n",
5757
"\n",
5858
"## Examples\n",
5959
"\n",
60-
"First lets create a set of data science skills."
60+
"First let's create a set of data science skills."
6161
]
6262
},
6363
{
@@ -107,7 +107,7 @@
107107
"\n",
108108
"Sets are unorderd and have no index so don't behave completely like lists.\n",
109109
"\n",
110-
"Therefore, we can't use an index to access items"
110+
"Therefore, we can't use an index to access items."
111111
]
112112
},
113113
{

1_Basics/11_Tuples.ipynb

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
"\n",
5252
"## Importance\n",
5353
"\n",
54-
"* Speed up operations because it's immutable.\n",
55-
"* Immutable sequences, often used for fixed data, like column names or coordinates in matplotlib plots.\n",
54+
"* Speed up operations because it's immutable\n",
55+
"* Immutable sequences, often used for fixed data, like column names or coordinates in Matplotlib plots\n",
5656
"\n",
5757
"## Examples\n",
5858
"\n",
@@ -106,7 +106,7 @@
106106
"source": [
107107
"### Get item\n",
108108
"\n",
109-
"Getting an element from a tuple using indexing. To get the first item from a tuple we'll get it at the index of 0."
109+
"Getting an element from a tuple using indexing. To get the first item from a tuple we'll get it at the index of `0`."
110110
]
111111
},
112112
{
@@ -154,7 +154,7 @@
154154
"source": [
155155
"### Slicing\n",
156156
"\n",
157-
"To only get part of a the tuple we'll use slicing. To only get 'python' and 'sql' values we'll get everything before the index of 2."
157+
"To only get part of a the tuple we'll use slicing. To only get 'python' and 'sql' values we'll get everything before the index of `2`."
158158
]
159159
},
160160
{
@@ -232,9 +232,9 @@
232232
"source": [
233233
"**Method 1: Turn tuple into a list.**\n",
234234
"\n",
235-
"* First turn it into a list.\n",
236-
"* Then use the `append()` method.\n",
237-
"* Convert the list to a tuple."
235+
"* First turn it into a list\n",
236+
"* Then use the `append()` method\n",
237+
"* Convert the list to a tuple"
238238
]
239239
},
240240
{
@@ -273,8 +273,8 @@
273273
"**Method 2: Add tuple to a tuple.**\n",
274274
"\n",
275275
"You can add tuples to tuples, which is good if you want to add one or more items. \n",
276-
"* Create a new tuple with the items.\n",
277-
"* Add it to the existing tuple."
276+
"* Create a new tuple with the items\n",
277+
"* Add it to the existing tuple"
278278
]
279279
},
280280
{
@@ -622,9 +622,9 @@
622622
"metadata": {},
623623
"source": [
624624
"Syntax: The `range()` function can be called with one, two, or three arguments: \n",
625-
"`range(stop)`: Generates numbers from 0 to stop-1 (read: stop minus 1). \n",
626-
"`range(start, stop)`: Generates numbers from start to stop-1. \n",
627-
"`range(start, stop, step)`: Generates numbers from start to stop-1."
625+
"* `range(stop)`: Generates numbers from 0 to stop-1 (read: stop minus 1)\n",
626+
"* `range(start, stop)`: Generates numbers from start to stop-1\n",
627+
"* `range(start, stop, step)`: Generates numbers from start to stop-1"
628628
]
629629
},
630630
{
@@ -715,13 +715,6 @@
715715
"source": [
716716
"list(range(0, 100, 2))"
717717
]
718-
},
719-
{
720-
"cell_type": "code",
721-
"execution_count": null,
722-
"metadata": {},
723-
"outputs": [],
724-
"source": []
725718
}
726719
],
727720
"metadata": {

1_Basics/12_Operators_Part_2.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"\n",
3737
"## Importance\n",
3838
"\n",
39-
"Logical operators are used for combining conditional statements, identity operators for comparing object identities, membership operators for testing data presence in sequences, and bitwise operators for manipulating individual bits, all vital for complex data operations in Python."
39+
"**Logical operators** are used for combining conditional statements, **identity operators** for comparing object identities, **membership operators** for testing data presence in sequences, and **bitwise operators** for manipulating individual bits, all are vital for complex data operations in Python."
4040
]
4141
},
4242
{
@@ -168,7 +168,7 @@
168168
"cell_type": "markdown",
169169
"metadata": {},
170170
"source": [
171-
"This is NOT checking if something is equal to something else."
171+
"This is *NOT* checking if something is equal to something else."
172172
]
173173
},
174174
{

0 commit comments

Comments
 (0)