Skip to content

Commit 0092122

Browse files
nnjaJim-HornChidinmaKOchristiannwambaloki-one
authored
Batching minor fixes and typo corrections into one PR (nnja#96)
* Update 00-who.md * add correction to minor typos * Update workshop website link in readme body * Typo correction * Update 20-adding-removing-finding.md I think that you wanted to state that one can call help on the variable that's already a list, instead of the type itself (?) * Typos in 04-the-repl-in-vscode.md Changed "type" to "directory" (but could possibly also just be "dir" here) and add the word "pass" to a sentence under the help() section. * Typos in Best Practices - 02-brief-history.md Just fixing a few small typos. * Typos in 020-basic-data-types / 00-variables.md Just a few minor typos * Update 50-sets.md * Update 65-mutability.md values in a python should be immutable * Update 60-dictionaries.md Remove unnecessary quotation mark * Fix typo. reccomended -> recommended * Update 00-variables.md * Fix typo ^ character is called caret. https://en.wikipedia.org/wiki/Caret * Fixed Grammatical Error * fix mistype Co-authored-by: Jim Horn <[email protected]> Co-authored-by: ChidinmaKO <[email protected]> Co-authored-by: Christian Nwamba <[email protected]> Co-authored-by: Lokesh Jadhav <[email protected]> Co-authored-by: Daniel Silva <[email protected]> Co-authored-by: Marc Johlic <[email protected]> Co-authored-by: trufkin <[email protected]> Co-authored-by: Eric Dai <[email protected]> Co-authored-by: Matilda Smeds <[email protected]> Co-authored-by: Kim Brandl <[email protected]> Co-authored-by: Adeyemi Ridwan <[email protected]> Co-authored-by: sherry808 <[email protected]> Co-authored-by: Itamar Held <[email protected]>
1 parent 1acec4c commit 0092122

File tree

14 files changed

+26
-26
lines changed

14 files changed

+26
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ These are the resources for Nina Zakharenko's Python Fundamentals and Intermedia
66

77
The majority of the content can be found on the course website.
88

9-
* [Course Website - learnpython.netlify.com](https://learnpython.netlify.com)
9+
* [Course Website - https://www.learnpython.dev](https://www.learnpython.dev)
1010
* [This Repo - git.io/python3](https://git.io/python3)
1111
* [Follow Nina on Twitter](https://twitter.com/nnja)
1212

website/content/01-introduction/00-who.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ draft: false
1010
{{< figure src="/images/me.jpg" width="20%" title="Nina Zakharenko" >}}
1111
</a>
1212

13-
Hi, I'm Nina Zakharenko. I'm a Senior Cloud Developer Advocate and Microsoft, focusing on Python. Before Microsoft, I wrote code for other cool companies like Reddit, Meetup, and HBO. In my spare time I like drinking scotch and tinkering with wearable electronics. I enjoy hiking and snowboarding from my home base in Portland, Oregon. I change my hair color regularly.
13+
Hi, I'm Nina Zakharenko. I'm a Senior Cloud Developer Advocate at Microsoft, focusing on Python. Before Microsoft, I wrote code for other cool companies like Reddit, Meetup, and HBO. In my spare time I like drinking scotch and tinkering with wearable electronics. I enjoy hiking and snowboarding from my home base in Portland, Oregon. I change my hair color regularly.
1414

1515

1616
I've been involved in the Python community for approximately 6 years. During that time I've spoken at multiple Python conferences on a variety of topics, including PyCon US, PyParis, DjangoCon, and even PyCon Russia in Moscow.

website/content/01-introduction/02-requirements/05-vs-code/04-the-repl-in-vscode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ For example, in the REPL, let's make a new variable `name`, and check its `type`
9090
We'll see that the type is `str`, Python's version of a string. Now that we know this object's type, we can
9191
pass the type into other methods.
9292

93-
The first one is `dir()` which stands for directory. If we check the type of `str` (notice, no quotes here)) in the REPL, we'll see all the methods available on strings in Python. Don't worry about these for now, we'll use them later in the day.
93+
The first one is `dir()` which stands for directory. If we check the directory of `str` (notice, no quotes here)) in the REPL, we'll see all the methods available on strings in Python. Don't worry about these for now, we'll use them later in the day.
9494

9595
```Python
9696
>>> dir(str)
9797
['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
9898
```
9999

100-
The next useful method is `help()`. You can a type, method, or other object to help to instantly see available documentation about the method, the parameters it expects, and what it returns.
100+
The next useful method is `help()`. You can pass a type, method, or other object to help to instantly see available documentation about the method, the parameters it expects, and what it returns.
101101

102102
Let's try this in the REPL, and look up the documentation for the `isupper` method in String. We access it with the period symbol (`.`). This is called dot-notation.
103103

website/content/02-introduction-to-python/010-Best-Practices/02-brief-history.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ You might be surprised to learn that Python is 30 years old!
1313

1414
### Where is it used?
1515

16-
A common misconception that Python is a scripting language. It's used at companies from Reddit, to Netflix, to Dropbox.
16+
A common misconception is that Python is a scripting language. It's used at companies from Reddit, to Netflix, to Dropbox.
1717

1818
### What's all this about Python 2 vs Python 3
1919

20-
This part is a bit of a stain on Pythons history. Python 3 was released 2008, and its adoption was slow. First and foremost because it took popular packages a fair amount of time to port over their code.
20+
This part is a bit of a stain on Python's history. Python 3 was released 2008, and its adoption was slow. First and foremost because it took popular packages a fair amount of time to port over their code.
2121

2222
This debate is now over. Python 2 will reach end-of-life in 2020, meaning that important updates - including security updates - will stop being released. That's why this course focuses on *Python3 only*.
2323

@@ -56,4 +56,4 @@ The biggest yearly conference is [PyCon US](https://us.pycon.org) with approxima
5656

5757
There are many local user groups worldwide, with many listed on [this wiki](https://wiki.python.org/moin/LocalUserGroups).
5858

59-
There are many supportive groups for women and non-binary developers, such as [PyLadies](https://www.pyladies.com/) and [DjangoGirls](https://djangogirls.org/). These organizations have chapters in most major cities.
59+
There are many supportive groups for women and non-binary developers, such as [PyLadies](https://www.pyladies.com/) and [DjangoGirls](https://djangogirls.org/). These organizations have chapters in most major cities.

website/content/02-introduction-to-python/020-basic-data-types/00-variables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ weight: 1
77

88
### Naming Variables
99

10-
Python variables can't start with with a number. In general, they're named all lower case, separated by underscores. Unlike other languages, that name their variables with camelCase.
10+
Python variables can't start with a number. In general, they're named all lower case, separated by underscores. Unlike other languages, that name their variables with camelCase.
1111

1212
You don't want to name your variables the same as the *types* that we'll be working with. For example **don't** name your variables `int`, `list`, `dict`. Etc.
1313

@@ -56,7 +56,7 @@ When creating variables, there are a few best practices you should follow.
5656

5757
#### Naming Variables
5858

59-
Convention says that numbers should be named in lower case, with whole words separated by underscores.
59+
Convention says that variables should be named in lowercase, with whole words separated by underscores.
6060

6161
{{% notice note %}}
6262
If you want to learn more about Python naming conventions look at [PEP8](https://www.python.org/dev/peps/pep-0008/#naming-conventions) during a break.
@@ -84,7 +84,7 @@ If you notice your program behaving oddly and you can't find the source of the b
8484

8585
## Types
8686

87-
Python has a very easy way of determining the type of something. It's the `type()` function.
87+
Python has a very easy way of determining the type of something, with the `type()` function.
8888

8989
```python
9090
>>> num = 42
@@ -101,4 +101,4 @@ If you try to examine a variable on the REPL that's been set to `None`, you won'
101101
```python
102102
>>> x = None
103103
>>> x
104-
```
104+
```

website/content/02-introduction-to-python/080-advanced-datatypes/20-adding-removing-finding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ insert(self, index, object, /)
7676
Insert object before index.
7777
```
7878

79-
You can also call help on `list.insert`. Because `names` is already of type `list`, it achieves the same result.
79+
You can also call help on `names.insert`. Because `names` is already of type `list`, it achieves the same result.
8080

8181
##### `my_list.extend(other_list)` adds all the contents of `other_list` to `my_list`
8282

@@ -116,7 +116,7 @@ False
116116
Notice that only the *first* index of the string `"Nina"` is returned. We'll learn more about what an index is in the next chapter.
117117

118118
{{% notice info %}}
119-
If the item we're looking for *is not* in the list, Python with throw a `ValueError`.
119+
If the item we're looking for *is not* in the list, Python will throw a `ValueError`.
120120
{{% /notice %}}
121121

122122
You'll learn how to deal with exceptions later. For now, you can use the `in` operator to check if an item is present in the list before finding its index.

website/content/02-introduction-to-python/080-advanced-datatypes/50-sets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Your set will update with each character of the `str`ing, which was probably not
197197
|--------------------- |------------------ |------------------------------------------------------------------------------- |
198198
| `s.union(t)` | <code>s &#124; t</code> | creates a new set with all the items **from both `s` and `t`** |
199199
| `s.intersection(t)` | `s & t` | creates a new set containing *only* items that are **both in `s` and in `t`** |
200-
| `s.difference(t)` | `s ^ t` | creates a new set with items **in `s` but not in `t`** |
200+
| `s.difference(t)` | `s ^ t` | creates a new set containing items that are **not in both `s` and in `t`** |
201201

202202
#### examples
203203

website/content/02-introduction-to-python/080-advanced-datatypes/60-dictionaries.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ If you try to put a key into a dictionary that's already there, you'll just end
142142

143143
>>> nums[8] = "oops, overwritten"
144144
>>> nums
145-
{1: 'one', 2: 'two', 3: 'three', 8: ', overwritten'}
145+
{1: 'one', 2: 'two', 3: 'three', 8: 'oops, overwritten'}
146146
>>> 8 in nums
147147
True
148148
```
@@ -178,7 +178,7 @@ There are three useful methods you need to remember about `dict`ionary access:
178178

179179
1. `my_dict.keys()`
180180
2. `my_dict.values()`
181-
3. `'my_dict.items()`
181+
3. `my_dict.items()`
182182

183183
#### 1. `my_dict.keys()` Getting all the keys in a dictionary
184184

@@ -204,4 +204,4 @@ Notice that `my_dict.items()` returns a type that looks like a list. It contains
204204
>>> nums = {1: 'one', 2: 'two', 3: 'three', 8: 'eight'}
205205
>>> nums.items()
206206
dict_items([(1, 'one'), (2, 'two'), (3, 'three'), (8, 'eight')])
207-
```
207+
```

website/content/02-introduction-to-python/080-advanced-datatypes/65-mutability.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ For the mutability of the container types we covered in this chapter, check this
2626
| container type | use | mutable? |
2727
|---------------- |--------------------------------------------------------------------------------------------------------- |---------- |
2828
| `list` | ordered group of items, accessible by position | **yes** |
29-
| `set` | unordered group of mutable items. useful for set operations (membership, intersection, difference, etc) | **yes** |
29+
| `set` | mutable unordered group consisting only of immutable items. useful for set operations (membership, intersection, difference, etc) | **yes** |
3030
| `tuple` | contain ordered groups of items in an **immutable** collection | **no** |
31-
| `dict` | contains key value pairs | **yes** |
31+
| `dict` | contains key value pairs | **yes** |

website/content/02-introduction-to-python/190-APIs/final-exercise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Let's review what we learned today and put it all together.
1111
For the final exercise of today, we're going to write a small program that requests the top repositories from GitHub, ordered by the number of stars each repository has, then we're going to print the results to our terminal. Create a new file called `day_one.py`.
1212

1313
{{% notice note %}}
14-
You may need to install the `requests` library using `python -m pip install requests`. You may see `pip` used directly, but using `python -m pip` is [reccomended by Python](https://docs.python.org/3/installing/index.html).
14+
You may need to install the `requests` library using `python -m pip install requests`. You may see `pip` used directly, but using `python -m pip` is [recommended by Python](https://docs.python.org/3/installing/index.html).
1515
{{% /notice %}}
1616

1717
Let's start with our key function, the one that gets the data from the [GitHub API](https://developer.github.com/v3/search/). Use the `requests` library to do a GET request on the GitHub search API URL ("https://api.github.com/search/repositories"). Use `if __name__ == "__main__"` to check to make sure we're running the file directly, and to call our function. Don't forget to `import requests`

0 commit comments

Comments
 (0)