Digital Library

Python编程无师自通 (Unknown)(Z-Library)

[美] 科里·奥尔索夫(Cory Althoff)

Python编程无师自通 (Unknown)(Z-Library)

Author [美] 科里·奥尔索夫(Cory Althoff)

python
Language Japanese

No Description

Format EPUB
Size 209.1 KB
223
Views
0
Downloads
0.00
Total Donations

AI Guide

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

Full assistant
AI guide
# Python编程无师自通 (The Self-Taught Programmer) ## 【One-Line Pitch】 A practical, career-oriented guide that teaches Python programming and the essential skills needed to become a professional software engineer — ideal for self-learners, career changers, and anyone who wants to code for a living rather than as a hobby. ## 【Book Arc】 - **Opening (~0%–10%)**: The author, a political science graduate who became a software engineer at eBay, explains his "backward" learning philosophy — code first, theory later. He sets up the book's structure: five parts covering programming basics, OOP, tools, computer science, and career advice. The reader is guided through installing Python and writing their first "Hello, World!" program in IDLE. - **Early (~10%–32%)**: Core Python fundamentals are introduced: comments, data types (strings, integers, floats, booleans, NoneType), variables and constants, arithmetic and comparison operators, logical operators, and the concept of syntax. The reader learns to run code both in the interactive shell and from .py files, with clear explanations of the differences in output. - **Middle (~32%–52%)**: Control flow takes center stage: if statements, if-else chains, elif branches, nested conditionals, and compound statements (headers and suites). The book then transitions into functions — how to define, call, and pass parameters to them, emphasizing reusability and the importance of doing one thing well. - **Middle (~52%–75%)**: The book moves into containers (lists, dictionaries, tuples, sets), string manipulation, loops (for and while), modules, and file I/O. A comprehensive exercise chapter consolidates these skills before transitioning into Part 2 on object-oriented programming. - **Late (~75%–100%)**: The final sections cover programming paradigms, the four pillars of OOP (encapsulation, abstraction, inheritance, polymorphism), and then pivot to professional tools: Bash, regular expressions, package managers, and version control with Git. The book concludes with an introduction to data structures and algorithms, followed by practical career advice on best practices, finding a job, teamwork, and continued learning. ## 【Key Takeaways】 - **Learn by doing, not by theory first** (Opening): The author deliberately reverses traditional CS education — you write code immediately and learn theory only after you have practical experience. This keeps motivation high because you understand *why* the theory matters. (Early) - **The interactive shell and .py files serve different purposes** (Early): Use the shell for quick experiments and short snippets; use saved files for reusable programs. Output differs between the two — the shell echoes values, while files only print with explicit `print()` calls. (Early) - **Variables are created by assignment, not declaration** (Early): Unlike C, Python doesn't require type declarations — just use `=` to assign a value. Follow four naming rules: no spaces, only letters/digits/underscores, no leading digits, and avoid Python keywords. (Early) - **Operators follow a strict precedence order** (Early): PEMDAS (parentheses, exponents, multiplication/division, addition/subtraction) governs evaluation, with left-to-right for equal precedence. The modulo operator `%` is especially useful for checking even/odd numbers. (Early) - **Comparison vs. assignment is a critical distinction** (Early): `=` assigns values; `==` checks equality. Logical operators (`and`, `or`, `not`) combine expressions and always evaluate to `True` or `False`. (Early) - **Control flow is built from compound statements** (Middle): `if`, `elif`, and `else` form decision trees; each clause has a header (with keyword and colon) and an indented suite. Multiple `if` statements run independently, while `if-elif-else` chains execute only one branch. (Middle) - **Functions are reusable, single-purpose units** (Middle): Define with `def`, pass inputs as parameters, and return outputs with `return`. Save return values to variables when you need them later. Good functions do one thing and do it well. (Middle) ## 【Reading Tips】 - **Skim the early chapters if you have any programming experience** — the first 30% covers standard syntax, operators, and variables. Focus instead on the author's unique "backward learning" philosophy and the practical setup instructions. - **Deep-read the control flow and function chapters (roughly 32%–52%)** — these are the foundation of all Python logic. Pay special attention to the distinction between multiple `if` statements and `if-elif-else` chains, as this confuses many beginners. - **Type out every code example yourself** — the author emphasizes this repeatedly. Copying from e-books or Word can introduce invisible formatting errors; typing by hand builds muscle memory and debugging skills. - **Watch for the book's convention of using square brackets** — `[内容]` means "replace this with your own code." This appears throughout the function chapters and is essential for understanding the examples. - **Use the chapter-end glossaries and challenge exercises** — each chapter defines key terms in italics and provides practice problems with downloadable answers. These are your self-assessment tools. ## 【Coverage Limits】 This guide covers the book's opening through the functions chapter (~52% of the book). The excerpts do not cover containers, loops, modules, file I/O, object-oriented programming, tools (Bash, regex, Git), data structures, algorithms, or career advice — though the table of contents confirms these topics are included in the full book. ##

Passage locations

Excerpt 1
术》一书中回忆了他如何反向学习国际象棋。他没有和其他人一样研究开局,而是从学习象棋残局(棋盘上只剩下少数几个棋子)开始。这样做让他对国际象棋有了更深的理解,并赢得了多次大赛冠军。与此类似,我认为先学习如何编程再学习理论的方法更高效,因为你会拥有了解背后原理的强烈驱动。这就是为什么本书一直到第五部分才介绍计算机科学...
View in text
Excerpt 2
inyurl.com/jpzlwqq
 2 
 3 
 4 # 打印 Hello, World!
 5 print("Hello, World!") 注释之所以多余,是因为这行代码的功能已经非常明确。下面是一个注释合理的例子: 01 # http://tinyurl.com/z52...
View in text
Excerpt 3
左侧的大于或等于右侧的数字,则表达式的值为 True ,否则即为 False : 1 # http://tinyurl.com/jy2oefs&#13; 2 &#13; 3 2 >= 2&#13; &#13; >> True 在含有 <= 操作符的表达式中,如果左侧的数字小于或等于右侧的数字,则表达式的值为 Tr...
View in text
Excerpt 4
3; 06 print("10!")&#13; 07 elif x == 20:&#13; 08 print ("20!")&#13; 09 else :&#13; 10 print ("I don't know!")&#13; 11 &#13; 12 &#13; 13 if x == 100:&#13; 14...
View in text

Support Author

0.00
Total Amount (¥)
0
Donation Count
Please enter an amount Minimum ¥1

You will be redirected to Alipay to complete payment, then return here.

Recommended for You

Loading recommended books...
Failed to load, please try again later
Back to List