CHF34.90
Download steht sofort bereit
You Will Learn Python 3!
Zed Shaw has perfected the world's best system for learning Python 3. Follow it and you will succeed-just like the millions of beginners Zed has taught to date! You bring the discipline, commitment, and persistence; the author supplies everything else.
In Learn Python 3 the Hard Way, you'll learn Python by working through 52 brilliantly crafted exercises. Read them. Type their code precisely. (No copying and pasting!) Fix your mistakes. Watch the programs run. As you do, you'll learn how a computer works; what good programs look like; and how to read, write, and think about code. Zed then teaches you even more in 5+ hours of video where he shows you how to break, fix, and debug your code-live, as he's doing the exercises.
This Book Is Perfect For
Autorentext
Zed A. Shaw is the author of the popular online books Learn Python the Hard Way, Learn Ruby the Hard Way, and Learn C the Hard Way. He is also the creator of several open source software projects and has been programming and writing for nearly 20 years. Most of his free time is devoted to the study of painting and art history.
Inhalt
Preface xvii Acknowledgments xx
Exercise 0: The Setup 2
macOS 2
Windows 3
Linux 4
Finding Things on the Internet 5
Warnings for Beginners 6
Alternative Text Editors 6
Exercise 1: A Good First Program 8
What You Should See 10
Study Drills 12
Common Student Questions 12
Exercise 2: Comments and Pound Characters 14
What You Should See 14
Study Drills 14
Common Student Questions 15
Exercise 3: Numbers and Math 16
What You Should See 17
Study Drills 17
Common Student Questions 17
Exercise 4: Variables and Names 20
What You Should See 21
Study Drills 21
Common Student Questions 21
Exercise 5: More Variables and Printing 24
What You Should See 24
Study Drills 25
Common Student Questions 25
Exercise 6: Strings and Text 26
What You Should See 27
Study Drills 27
Break It 27
Common Student Questions 27
Exercise 7: More Printing 28
What You Should See 28
Study Drills 29
Break It 29
Common Student Questions 29
Exercise 8: Printing, Printing 30
What You Should See 30
Study Drills 31
Common Student Questions 31
Exercise 9: Printing, Printing, Printing 32
What You Should See 32
Study Drills 33
Common Student Questions 33
Exercise 10: What Was That? 34
What You Should See 35
Escape Sequences 35
Study Drills 36
Common Student Questions 36
Exercise 11: Asking Questions 38
What You Should See 38
Study Drills 39
Common Student Questions 39
Exercise 12: Prompting People 40
What You Should See 40
Study Drills 40
Common Student Questions 41
Exercise 13: Parameters, Unpacking, Variables 42
Hold Up! Features Have Another Name 42
What You Should See 43
Study Drills 44
Common Student Questions 44
Exercise 14: Prompting and Passing 46
What You Should See 46
Study Drills 47
Common Student Questions 47
Exercise 15: Reading Files 48
What You Should See 49
Study Drills 49
Common Student Questions 50
Exercise 16: Reading and Writing Files 52
What You Should See 53
Study Drills 53
Common Student Questions 54
Exercise 17: More Files 56
What You Should See 56
Study Drills 57
Common Student Questions 57
Exercise 18: Names, Variables, Code, Functions 60
What You Should See 61
Study Drills 62
Common Student Questions 62
Exercise 19: Functions and Variables 64
What You Should See 65
Study Drills 65
Common Student Questions 65
Exercise 20: Functions and Files 68
What You Should See 69
Study Drills 69
Common Student Questions 69
Exercise 21: Functions Can Return Something 72
What You Should See 73
Study Drills 73
Common Student Questions 74
Exercise 22: What Do You Know So Far? 76
What You Are Learning 76
Exercise 23: Strings, Bytes, and Character Encodings 78
Initial Research 78
Switches, Conventions, and Encodings 80
Disecting the Output 82
Disecting the Code 82
Encodings Deep Dive 84
Breaking It 85
Exercise 24: More Practice 86
What You Should See 87
Study Drills 87
Common Student Questions 87
Exercise 25: Even More Practice 90
What You Should See 91
Study Drills 92
Common Student Questions 93
Exercise 26: Congratulations, Take a Test! 94
Common Student Questions 94
Exercise 27: Memorizing Logic 96
The Truth Terms 96
The Truth Tables 97
Common Student Questions 98
Exercise 28: Boolean Practice 100
What You Should See 102
Study Drills 102
Common Student Questions 102
Exercise 29: What If 104
What You Should See 104
Study Drills 105
Common Student Questions 105
Exercise 30: Else and If 106
What You Should See 107
Study Drills 107
Common Student Questions 107
Exercise 31: Making Decisions 108
What You Should See 109
Study Drills 109
Common Student Questions 109
Exercise 32: Loops and Lists 112
What You Should See 113
Study Drills 114
Common Student Questions 114
Exercise 33: While Loops 116
What You Should See 117
Study Drills 117
Common Student Questions 118
Exercise 34: Accessing Elements of Lists 120
Study Drills 121
Exercise 35: Branches and Functions 122
What You Should See 123
Study Drills 124
Common Student Questions 124
Exercise 36: Designing and Debugging 126
Rules for if-statements 126
Rules for Loops 126
Tips for Debugging 127
Homework 127
Exercise 37: Symbol Review 128
Keywords 128
Data Types 129
String Escape Sequences 130
Old Style String Formats 130
Operators 131
Reading Code 132
Study Drills 133
Common Student Questions 133
Exercise 38: Doing Things to Lists 134
What You Should See 135
What Lists Can Do 136
When to Use Lists 137
Study Drills 137
Common Student Questions 138
Exercise 39: Dictionaries, Oh Lovely Dictionaries 140
A Dictionary Example 141
What You Should See 142
What Dictionaries Can Do 143
Study Drills 144
Common Student Questions 144
Exercise 40: Modules, Classes, and Objects 146
Modules Are Like Dictionaries 146
What You Should See 150
Study Drills 150
Common Student Questions 151
Exercise 41: Learning to Speak Object-Oriented 152
Word Drills 152
Phrase Drills 152
Combined Drills 153
A Reading Test 153
Practice English to Code 155
Reading More Code 156
Common Student Questions 156
Exercise 42: Is-A, Has-A, Objects, and Classes 158
How This Looks in Code 159
About class Name(object) 161
Study Drills 161
Common Student Questions 161
Exercise 43: Basic Object-Oriented Analysis and Design 164
The Analysis of a Simple Game Engine 165
Top Down versus Bottom Up 169
The Code for "Gothons from Planet Percal #25" 170 …