Log in Sign up
Trang chủeBookLearn Python 3 the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code, 4th edition
Learn Python 3 the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code, 4th edition

Learn Python 3 the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code, 4th edition

BRAND: PEARSON
Publisher:
PEARSON
Author:
Zed A. Shaw
Edition:
(June 27, 2017) © 2018
eBook ISBN:
9780137460601
Print ISBN:
9780134692883
Type:
4 Months Subscription. Dành cho Cá nhân
eBook edition. Monthly Subscription. Dành cho Cá nhân | Trường ĐH, Nhóm, Thư Viện: Gọi 0915920514 để báo giá Pearson, Vital Source eBook hoặc mua Sách In

Tổng quan sách

Zed Shaw đã hoàn thiện hệ thống học Python tốt nhất thế giới. Làm theo nó, học sinh sẽ thành công - giống như hàng trăm nghìn người mới bắt đầu mà Zed đã dạy cho đến nay! Trong Learn Python 3 the Hard Way, học sinh sẽ học Python trong khi thực hiện 52 bài tập được soạn thảo khéo léo. Đọc chúng. Nhập mã của họ một cách chính xác. (Không sao chép và dán!) Sửa lỗi. Xem các chương trình chạy. Khi làm vậy, họ sẽ học cách hoạt động của phần mềm; các chương trình hay trông như thế nào; cách đọc, viết và suy nghĩ về mã; và cách tìm và sửa lỗi bằng các thủ thuật mà các lập trình viên chuyên nghiệp thường sử dụng.Zed Shaw has perfected the world's best system for learning Python. Following it, students will succeed-just like the hundreds of thousands of beginners Zed has taught to date! In Learn Python 3 the Hard Way, students will learn Python while working through 52 brilliantly crafted exercises. Read them. Type their code precisely. (No copying and pasting!) Fix mistakes. Watch the programs run. As they do, they'll learn how software works; what good programs look like; how to read, write, and think about code; and how to find and fix your mistakes using tricks professional programmers use.
Preface xviiAcknowledgments xxExercise 0: The Setup 2macOS 2Windows 3Linux 4Finding Things on the Internet 5Warnings for Beginners 6Alternative Text Editors 6Exercise 1: A Good First Program 8What You Should See 10Study Drills 12Common Student Questions 12Exercise 2: Comments and Pound Characters 14What You Should See 14Study Drills 14Common Student Questions 15Exercise 3: Numbers and Math 16What You Should See 17Study Drills 17Common Student Questions 17Exercise 4: Variables and Names 20What You Should See 21Study Drills 21Common Student Questions 21Exercise 5: More Variables and Printing 24What You Should See 24Study Drills 25Common Student Questions 25Exercise 6: Strings and Text 26What You Should See 27Study Drills 27Break It 27Common Student Questions 27Exercise 7: More Printing 28What You Should See 28Study Drills 29Break It 29Common Student Questions 29Exercise 8: Printing, Printing 30What You Should See 30Study Drills 31Common Student Questions 31Exercise 9: Printing, Printing, Printing 32What You Should See 32Study Drills 33Common Student Questions 33Exercise 10: What Was That? 34What You Should See 35Escape Sequences 35Study Drills 36Common Student Questions 36Exercise 11: Asking Questions 38What You Should See 38Study Drills 39Common Student Questions 39Exercise 12: Prompting People 40What You Should See 40Study Drills 40Common Student Questions 41Exercise 13: Parameters, Unpacking, Variables 42Hold Up! Features Have Another Name 42What You Should See 43Study Drills 44Common Student Questions 44Exercise 14: Prompting and Passing 46What You Should See 46Study Drills 47Common Student Questions 47Exercise 15: Reading Files 48What You Should See 49Study Drills 49Common Student Questions 50Exercise 16: Reading and Writing Files 52What You Should See 53Study Drills 53Common Student Questions 54Exercise 17: More Files 56What You Should See 56Study Drills 57Common Student Questions 57Exercise 18: Names, Variables, Code, Functions 60What You Should See 61Study Drills 62Common Student Questions 62Exercise 19: Functions and Variables 64What You Should See 65Study Drills 65Common Student Questions 65Exercise 20: Functions and Files 68What You Should See 69Study Drills 69Common Student Questions 69Exercise 21: Functions Can Return Something 72What You Should See 73Study Drills 73Common Student Questions 74Exercise 22: What Do You Know So Far? 76What You Are Learning 76Exercise 23: Strings, Bytes, and Character Encodings 78Initial Research 78Switches, Conventions, and Encodings 80Disecting the Output 82Disecting the Code 82Encodings Deep Dive 84Breaking It 85Exercise 24: More Practice 86What You Should See 87Study Drills 87Common Student Questions 87Exercise 25: Even More Practice 90What You Should See 91Study Drills 92Common Student Questions 93Exercise 26: Congratulations, Take a Test! 94Common Student Questions 94Exercise 27: Memorizing Logic 96The Truth Terms 96The Truth Tables 97Common Student Questions 98Exercise 28: Boolean Practice 100What You Should See 102Study Drills 102Common Student Questions 102Exercise 29: What If 104What You Should See 104Study Drills 105Common Student Questions 105Exercise 30: Else and If 106What You Should See 107Study Drills 107Common Student Questions 107Exercise 31: Making Decisions 108What You Should See 109Study Drills 109Common Student Questions 109Exercise 32: Loops and Lists 112What You Should See 113Study Drills 114Common Student Questions 114Exercise 33: While Loops 116What You Should See 117Study Drills 117Common Student Questions 118Exercise 34: Accessing Elements of Lists 120Study Drills 121Exercise 35: Branches and Functions 122What You Should See 123Study Drills 124Common Student Questions 124Exercise 36: Designing and Debugging 126Rules for if-statements 126Rules for Loops 126Tips for Debugging 127Homework 127Exercise 37: Symbol Review 128Keywords 128Data Types 129String Escape Sequences 130Old Style String Formats 130Operators 131Reading Code 132Study Drills 133Common Student Questions 133Exercise 38: Doing Things to Lists 134What You Should See 135What Lists Can Do 136When to Use Lists 137Study Drills 137Common Student Questions 138Exercise 39: Dictionaries, Oh Lovely Dictionaries 140A Dictionary Example 141What You Should See 142What Dictionaries Can Do 143Study Drills 144Common Student Questions 144Exercise 40: Modules, Classes, and Objects 146Modules Are Like Dictionaries 146What You Should See 150Study Drills 150Common Student Questions 151Exercise 41: Learning to Speak Object-Oriented 152Word Drills 152Phrase Drills 152Combined Drills 153A Reading Test 153Practice English to Code 155Reading More Code 156Common Student Questions 156Exercise 42: Is-A, Has-A, Objects, and Classes 158How This Looks in Code 159About class Name(object) 161Study Drills 161Common Student Questions 161Exercise 43: Basic Object-Oriented Analysis and Design 164The Analysis of a Simple Game Engine 165Top Down versus Bottom Up 169The Code for “Gothons from Planet Percal #25” 170What You Should See 176Study Drills 176Common Student Questions 177Exercise 44: Inheritance versus Composition 178What Is Inheritance? 178The Reason for super() 183Composition 184When to Use Inheritance or Composition 185Study Drills 185Common Student Questions 186Exercise 45: You Make a Game 188Evaluating Your Game 188Function Style 189Class Style 189Code Style 190Good Comments 190Evaluate Your Game 190Exercise 46: A Project Skeleton 192macOS/Linux Setup 192Windows 10 Setup 194Creating the Skeleton Project Directory 195Testing Your Setup 197Using the Skeleton 198Required Quiz 198Common Student Questions 198Exercise 47: Automated Testing 200Writing a Test Case 200Testing Guidelines 202What You Should See 202Study Drills 203Common Student Questions 203Exercise 48: Advanced User Input 204Our Game Lexicon 204A Test First Challenge 206What You Should Test 207Study Drills 209Common Student Questions 209Exercise 49: Making Sentences 210Match and Peek 210The Sentence Grammar 211A Word on Exceptions 211The Parser Code 211Playing with the Parser 214What You Should Test 215Study Drills 215Common Student Questions 215Exercise 50: Your First Website 216Installing flask 216Make a Simple “Hello World” Project 216What’s Going On? 218Fixing Errors 218Create Basic Templates 219Study Drills 221Common Student Questions 221Exercise 51: Getting Input from a Browser 224How the Web Works 224How Forms Work 226Creating HTML Forms 227Creating a Layout Template 229Writing Automated Tests for Forms 230Study Drills 232Breaking It 232Exercise 52: The Start of Your Web Game 234Refactoring the Exercise 43 Game 234Creating an Engine 239Your Final Exam 241Common Student Questions 242Next Steps 244How to Learn Any Programming Language 245Advice from an Old Programmer 246Appendix Command Line Crash Course 248Introduction: Shut Up and Shell 248The Setup 249Paths, Folders, Directories (pwd) 253If You Get Lost 255Make a Directory (mkdir) 255Change Directory (cd) 258List Directory (ls) 261Remove Directory (rmdir) 265Moving Around (pushd, popd) 268Making Empty Files (touch/New-Item) 271Copy a File (cp) 272Moving a File (mv) 275View a File (less/more) 277Stream a File (cat) 278Removing a File (rm) 280Exiting Your Terminal (exit) 282Command Line Next Steps 283Index 284
Chat Zalo