little things · pythonkid2/python-tutorial@85108ad · GitHub
Skip to content

Commit 85108ad

Browse files
committed
little things
1 parent 5a5d4c5 commit 85108ad

9 files changed

Lines changed: 47 additions & 37 deletions

File tree

README.md

Lines changed: 9 additions & 14 deletions

exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ all of these errors. You don't need to remember this tree, running
401401
`help('builtins')` should display a larger tree that this is a part of.
402402

403403
There's also a few exceptions that are not in this tree like SystemExit
404-
and KeyboardInterrupt, but most of the time you shouldn't catch them.
404+
and KeyboardInterrupt, but most of the time we shouldn't catch them.
405405
Catching Exception doesn't catch them either.
406406

407407
## Summary

getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Powers are calculated before `*` and `/`, but after `()`.
206206
## Summary
207207

208208
- Errors don't matter.
209-
- You can enter any Python commands to the interactive `>>>` prompt, and
209+
- We can enter any Python commands to the interactive `>>>` prompt, and
210210
it will echo back the result.
211211
- Pieces of text starting with a `#` are comments.
212212
- `+`, `-`, `*` and `/` work in Python just like in math.

handy-stuff-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ If you need to know more about formatting I recommend reading
321321

322322
![Slicing](images/slicing3.png)
323323

324-
- Indexing returns one character of a string. Remember that you don't
324+
- Indexing returns one character of a string. Remember that we don't
325325
need a `:` with indexing. The indexes work like this:
326326

327327
![Indexing](images/indexing3.png)

if.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ else:
280280
If it doesn't, write it to a file and run that file.
281281
- Indentation is important in Python.
282282
- Indented code under an if statement runs if the condition is true.
283-
- You can also add an else statement. Indented code under it will run
283+
- We can also add an else statement. Indented code under it will run
284284
if the code under the if statement does not run.
285285
- elif is short for else if.
286286

images/modules.png

112 KB
Loading

modules.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ OSX.
4646
You'll see a bunch of files and a few directories in the folder
4747
that opens:
4848

49-
**TODO: Add a screenshot.**
49+
![My Python's modules.](images/modules.png)
5050

5151
All of these `.py` files can be imported like we just imported
5252
`random.py`. In random.py, there's a like like `randint = something`,
@@ -175,7 +175,7 @@ module in many files, so it gets imported multiple times. If
175175
Python would reload the module every time it's imported,
176176
dividing code to multiple files would make the code run slower.
177177

178-
If you want to load the module again, just exit out of Python and
178+
If we need to load the module again we can just exit out of Python and
179179
launch it again.
180180

181181
## Brief overview of the standard library
@@ -473,16 +473,16 @@ section at the bottom.
473473

474474
## Summary
475475

476-
- Most modules are files on your computer, but some of them are built
476+
- Most modules are files on our computers, but some of them are built
477477
in to Python. We can use modules in our projects by importing them,
478478
and after that using `modulename.variable` to get a variable from
479479
the module.
480480
- Some of the most commonly used modules are random, sys, math, time
481481
and os.
482482
- Avoid creating `.py` files that have the same name as a name of a
483483
module you want to use.
484-
- Python comes with many modules, and you can install even more modules
485-
if you want to.
484+
- Python comes with many modules, and we can install even more modules
485+
if we want to.
486486

487487
***
488488

using-functions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Of course, `x = print('hello')` is useless compared to `print('hello')`
7777
because the print function always returns None and we can do `x = None`
7878
without any printing.
7979

80-
You can also print an empty line by calling print without any
80+
We can also print an empty line by calling print without any
8181
arguments:
8282

8383
```py
@@ -96,7 +96,7 @@ world
9696
>>>
9797
```
9898

99-
If you want to print a backslash, you need to **escape** it by typing
99+
If we want to print a backslash, we need to **escape** it by typing
100100
two backslashes:
101101

102102
[comment]: # (For some reason, GitHub's syntax highlighting doesn't)
@@ -106,8 +106,8 @@ two backslashes:
106106
hello\nworld
107107
>>>
108108

109-
You can also pass multiple arguments to the print function. Separate
110-
them with commas, and print will add spaces between them.
109+
We can also pass multiple arguments to the print function. We need to
110+
separate them with commas and print will add spaces between them.
111111

112112
```py
113113
>>> print("Hello", "World!")
@@ -139,7 +139,7 @@ screen and waited for me to type something. I typed hello and pressed
139139
Enter. Then input returned the hello I typed as a string and it was
140140
assigned to x.
141141

142-
You may want to add a space after the `:`, like this:
142+
Usually we want to add a space after the `:`, like this:
143143

144144
```py
145145
>>> x = input("Enter something: ") # now there's space between : and where i type

variables.md

Lines changed: 24 additions & 9 deletions

0 commit comments

Comments
 (0)