Skip to content

Commit 7b8aecb

Browse files
updates for version 1.2
1 parent 4df3bf9 commit 7b8aecb

File tree

7 files changed

+152
-86
lines changed

7 files changed

+152
-86
lines changed

100_page_python_intro.md

Lines changed: 136 additions & 82 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This book is a short, introductory guide for the Python programming language. Th
1010
<img src="./images/py_intro.png" width="320px" height="400px" />
1111
</p>
1212

13-
The book also includes exercises to test your understanding.
13+
The book also includes exercises to test your understanding, which is presented together as a single file in this repo — [Exercises.md](./exercises/Exercises.md)
1414

1515
See [Version_changes.md](./Version_changes.md) to keep track of changes made to the book.
1616

@@ -82,6 +82,7 @@ Twitter: https://twitter.com/learn_byexample
8282
* [LibreOffice Draw](https://www.libreoffice.org/discover/draw/) — title/author text
8383
* [pngquant](https://pngquant.org/) and [svgcleaner](https://github.com/RazrFalcon/svgcleaner) for optimizing images
8484
* [Warning](https://commons.wikimedia.org/wiki/File:Warning_icon.svg) and [Info](https://commons.wikimedia.org/wiki/File:Info_icon_002.svg) icons by [Amada44](https://commons.wikimedia.org/wiki/User:Amada44) under public domain
85+
* **Dean Clark** and **Elijah** for catching a few typos
8586
* [mdBook](https://github.com/rust-lang/mdBook) — for web version of the book
8687
* [mdBook-pagetoc](https://github.com/JorelAli/mdBook-pagetoc) — for adding table of contents for each chapter
8788
* [minify-html](https://github.com/wilsonzlin/minify-html) — for minifying html files

Version_changes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<br>
22

3+
### 1.2
4+
5+
* Updated installation section with more details
6+
* Added instructions for using Python from Windows CMD
7+
* Examples for escaping `{` and `}` characters when using f-strings
8+
* Corrected various typos, improved descriptions, code snippets, comments, external links, etc
9+
* [Exercises.md](./exercises/Exercises.md) file created to collate all the exercises in one place
10+
* Fun fact: total diff count for the markdown source file is exactly `100` for this update
11+
12+
<br>
13+
314
### 1.0
415

516
* First version

exercises/Exercises.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
* Given `primes = (2, 3, 5, 7, 11)`:
246246
* what happens if you use `primes[5]` or `primes[-6]`?
247247
* what happens if you use `primes[:5]` or `primes[-6:]`?
248-
* is it possible to get the same output as `primes[::-1]` by using an explicit number for `stop` value? If not, why not?
248+
* is it possible to get the same output as `primes[::-1]` by using an explicit number for the `stop` value? If not, why not?
249249
* What do you think will happen for these cases, given `nums = (1, 2)`:
250250
* `a, b, c = nums`
251251
* `a, *b, c = nums`

programs/dealing_with_files/read_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
with open('ip.txt', 'r', encoding='ascii') as f:
1+
with open('ip.txt', mode='r', encoding='ascii') as f:
22
for ip_line in f:
33
op_line = ip_line.rstrip('\n').capitalize() + '.'
44
print(op_line)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
with open('op.txt', 'w', encoding='ascii') as f:
1+
with open('op.txt', mode='w', encoding='ascii') as f:
22
f.write('this is a sample line of text\n')
33
f.write('yet another line\n')
44

Binary file not shown.

0 commit comments

Comments
 (0)