Learn Python the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code (3rd Edition)

Rs. 90,720
  • Author: Zed Shaw
  • ISBN: 9780321884916
  • Publisher: Pearson Education
  • Edition: 3rd
  • Format: Paperback – 320 pages
  • Language: English

Out of stock



Share
Description

You Will Learn Python!

Zed Shaw has perfected the world’s best system for learning Python. Follow it and you will succeed-just like the hundreds of thousands of beginners Zed has taught to date! You bring the discipline, commitment, and persistence; the author supplies everything else.

In Learn Python the Hard Way, Third Edition, 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 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. Most importantly, you’ll learn the following, which you need to start writing excellent Python software of your own:

  • Installing a complete Python environment
  • Organizing and writing code
  • Basic mathematics
  • Variables
  • Strings and text
  • Interacting with users
  • Working with files
  • Looping and logic
  • Data structures using lists and dictionaries
  • Program design
  • Object-oriented programming
  • Inheritance and composition
  • >Modules, classes, and objects
  • Python packaging
  • Debugging
  • Automated testing
  • Basic game development
  • Basic web development

It’ll be hard at first. But soon, you’ll just get it-and that will feel great!

This tutorial will reward you for every minute you put into it. Soon, you’ll know one of the world’s most powerful, popular programming languages. You’ll be a Python programmer.

Watch Zed, too! The accompanying DVD contains 5+ hours of passionate, powerful teaching: a complete Python video course!

Table of Contents
  1. Preface 1
  2. Acknowledgments 1
  3. The Hard Way Is Easier 1
  4. Do Not Copy-Paste 2
  5. A Note on Practice and Persistence 3
  6. A Warning for the Smarties 3
  7. Exercise 0: The Setup 6
    1. Mac OSX 6
    2. Windows 7
    3. Linux 9
    4. Warnings for Beginners 10
  8. Exercise 1: A Good First Program 12
    1. What You Should See 14
    2. Study Drills 15
    3. Common Student Questions 16
  9. Exercise 2: Comments and Pound Characters 18
    1. What You Should See 18
    2. Study Drills 18
    3. Common Student Questions 19
  10. Exercise 3: Numbers and Math 20
    1. What You Should See 21
    2. Study Drills 21
    3. Common Student Questions 22
  11. Exercise 4: Variables and Names 24
    1. What You Should See 25
    2. Study Drills 25
    3. Common Student Questions 25
  12. Exercise 5: More Variables and Printing 28
    1. What You Should See 28
    2. Study Drills 29
    3. Common Student Questions 29
  13. Exercise 6: Strings and Text 30
    1. What You Should See 31
    2. Study Drills 31
    3. Common Student Questions 31
  14. Exercise 7: More Printing. 32
    1. What You Should See 32
    2. Study Drills 32
    3. Common Student Questions 33
  15. Exercise 8: Printing, Printing 34
    1. What You Should See 34
    2. Study Drills 34
    3. Common Student Questions 34
  16. Exercise 9: Printing, Printing, Printing 36
    1. What You Should See 36
    2. Study Drills 36
    3. Common Student Questions 37
  17. Exercise 10: What Was That? 38
    1. What You Should See 39
    2. Escape Sequences 39
    3. Study Drills 40
    4. Common Student Questions 40
  18. Exercise 11: Asking Questions 42
    1. What You Should See 42
    2. Study Drills 43
    3. Common Student Questions 43
  19. Exercise 12: Prompting People 44
    1. What You Should See 44
    2. Study Drills 44
    3. Common Student Questions 45
  20. Exercise 13: Parameters, Unpacking, Variables 46
    1. Hold Up! Features Have Another Name 46
    2. What You Should See 47
    3. Study Drills 48
    4. Common Student Questions 48
  21. Exercise 14: Prompting and Passing 50
    1. What You Should See 50
    2. Study Drills 51
    3. Common Student Questions 51
  22. Exercise 15: Reading Files 54
    1. What You Should See 55
    2. Study Drills 55
    3. Common Student Questions 56
  23. Exercise 16: Reading and Writing Files 58
    1. What You Should See 59
    2. Study Drills 59
    3. Common Student Questions 60
  24. Exercise 17: More Files 62
    1. What You Should See 63
    2. Study Drills 63
    3. Common Student Questions 63
  25. Exercise 18: Names, Variables, Code, Functions 66
    1. What You Should See 67
    2. Study Drills 68
    3. Common Student Questions 68
  26. Exercise 19: Functions and Variables 70
    1. What You Should See 71
    2. Study Drills 71
    3. Common Student Questions 71
  27. Exercise 20: Functions and Files 74
    1. What You Should See 75
    2. Study Drills 75
    3. Common Student Questions 75
  28. Exercise 21: Functions Can Return Something 78
    1. What You Should See 79
    2. Study Drills 79
    3. Common Student Questions 80
  29. Exercise 22: What Do You Know So Far? 81
    1. What You Are Learning 81
    2. Exercise 23: Read Some Code 82
  30. Exercise 24: More Practice 84
    1. What You Should See 85
    2. Study Drills 85
    3. Common Student Questions 85
  31. Exercise 25: Even More Practice 86
    1. What You Should See 87
    2. Study Drills 88
    3. Common Student Questions 89
  32. Exercise 26: Congratulations, Take a Test! 90
    1. Common Student Questions 90
  33. Exercise 27: Memorizing Logic 92
    1. The Truth Terms 92
    2. The Truth Tables 93
    3. Common Student Questions 94
  34. Exercise 28: Boolean Practice 96
    1. What You Should See 98
    2. Study Drills 98
    3. Common Student Questions 98
  35. Exercise 29: What If 100
    1. What You Should See 100
    2. Study Drills 101
    3. Common Student Questions 101
  36. Exercise 30: Else and If 102
    1. What You Should See 103
    2. Study Drills 103
    3. Common Student Questions 103
  37. Exercise 31: Making Decisions 104
    1. What You Should See 105
    2. Study Drills 105
    3. Common Student Questions 105
  38. Exercise 32: Loops and Lists 106
    1. What You Should See 107
    2. Study Drills 108
    3. Common Student Questions 108
  39. Exercise 33: While-Loops 110
    1. What You Should See 111
    2. Study Drills 111
    3. Common Student Questions 112
  40. Exercise 34: Accessing Elements of Lists 114
    1. Study Drills 115
  41. Exercise 35: Branches and Functions 116
    1. What You Should See 117
    2. Study Drills 118
    3. Common Student Questions 118
  42. Exercise 36: Designing and Debugging 120
    1. Rules for If-Statements 120
    2. Rules for Loops 120
    3. Tips for Debugging 121
    4. Homework 121
  43. Exercise 37: Symbol Review 122
    1. Keywords 122
    2. Data Types 123
    3. String Escape Sequences 124
    4. String Formats 124
    5. Operators 125
    6. Reading Code 126
    7. Study Drills 127
    8. Common Student Questions 127
  44. Exercise 38: Doing Things to Lists 128
    1. What You Should See 129
    2. Study Drills 130
    3. Common Student Questions 130
  45. Exercise 39: Dictionaries, Oh Lovely Dictionaries 132
    1. What You Should See 134
    2. Study Drills 135
    3. Common Student Questions 135
  46. Exercise 40: Modules, Classes, and Objects 138
    1. Modules Are Like Dictionaries 138
    2. What You Should See 142
    3. Study Drills 142
    4. Common Student Questions 143
  47. Exercise 41: Learning to Speak Object Oriented 144
    1. Word Drills 144
    2. Phrase Drills 144
    3. Combined Drills 145
    4. A Reading Test 145
    5. Practice English to Code 147
    6. Reading More Code 148
    7. Common Student Questions 148
  48. Exercise 42: Is-A, Has-A, Objects, and Classes 150
    1. How This Looks in Code 151
    2. About class Name(object) 153
    3. Study Drills 153
    4. Common Student Questions 154
  49. Exercise 43: Basic Object-Oriented Analysis and Design 156
    1. The Analysis of a Simple Game Engine 157
    2. Top Down vs. Bottom Up 161
    3. The Code for “Gothons from Planet Percal #25” 162
    4. What You Should See 167
    5. Study Drills 168
    6. Common Student Questions 168
  50. Exercise 44: Inheritance vs. Composition 170
    1. What Is Inheritance? 170
    2. The Reason for super() 175
    3. Composition 176
    4. When to Use Inheritance or Composition 177
    5. Study Drills 177
    6. Common Student Questions 178
  51. Exercise 45: You Make a Game 180
    1. Evaluating Your Game 180
    2. Function Style 181
    3. Class Style 181
    4. Code Style 182
    5. Good Comments 182
    6. Evaluate Your Game 183
  52. Exercise 46: A Project Skeleton 184
    1. Installing Python Packages 184
    2. Creating the Skeleton Project Directory 185
    3. Testing Your Setup 187
    4. Using the Skeleton 188
    5. Required Quiz 188
    6. Common Student Questions 189
  53. Exercise 47: Automated Testing 190
    1. Writing a Test Case 190
    2. Testing Guidelines 192
    3. What You Should See 192
    4. Study Drills 193
    5. Common Student Questions 193
  54. Exercise 48: Advanced User Input 194
    1. Our Game Lexicon 194
    2. What You Should Test 196
    3. Design Hints 198
    4. Study Drills 198
    5. Common Student Questions 198
  55. Exercise 49: Making Sentences 200
    1. Match and Peek 200
    2. The Sentence Grammar 201
    3. A Word on Exceptions 203
    4. What You Should Test 204
    5. Study Drills 204
    6. Common Student Questions 204
  56. Exercise 50: Your First Website 206
    1. Installing lpthw.web 206
    2. Make a Simple “Hello World” Project 207
    3. What’s Going On? 208
    4. Fixing Errors 209
    5. Create Basic Templates 209
    6. Study Drills 211
    7. Common Student Questions 211
  57. Exercise 51: Getting Input from a Browser 214
    1. How the Web Works 214
    2. How Forms Work 216
    3. Creating HTML Forms 218
    4. Creating a Layout Template 220
    5. Writing Automated Tests for Forms 221
    6. Study Drills 223
    7. Common Student Questions 224
  58. Exercise 52: The Start of Your Web Game 226
    1. Refactoring the Exercise 43 Game 226
    2. Sessions and Tracking Users 231
    3. Creating an Engine 232
    4. Your Final Exam 235
    5. Common Student Questions 236
    6. Next Steps 237
    7. How to Learn Any Programming Language 238
    8. Advice from an Old Programmer 241
  59. Appendix: Command Line Crash Course 243
    1. Introduction: Shut Up and Shell 243
    2. Exercise 1: The Setup 245
    3. Exercise 2: Paths, Folders, Directories (pwd) 248
    4. Exercise 3: If You Get Lost 250
    5. Exercise 4: Make a Directory (mkdir) 250
    6. Exercise 5: Change Directory (cd) 252
    7. Exercise 6: List Directory (ls) 256
    8. Exercise 7: Remove Directory (rmdir) 260
    9. Exercise 8: Move Around (pushd, popd) 262
    10. Exercise 9: Make Empty Files (Touch, New-Item) 265
    11. Exercise 10: Copy a File (cp) 266
    12. Exercise 11: Move a File (mv) 269
    13. Exercise 12: View a File (less, MORE) 271
    14. Exercise 13: Stream a File (cat) 272
    15. Exercise 14: Remove a File (rm) 273
    16. Exercise 15: Exit Your Terminal (exit) 275
    17. Command Line Next Steps 276
  60. Index 279
Author Biography

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 like Mongrel, Lamson, Mongrel2, and has been programming and writing for nearly 20 years.

Additional information
Weight0.526 kg
Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.