Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
About This eBook
Title Page
Copyright Page
Contents
Preface
Acknowledgments
The Hard Way Is Easier
Do Not Copy-Paste
A Note on Practice and Persistence
A Warning for the Smarties
Exercise 0. The Setup
Mac OSX
Windows
Linux
Warnings for Beginners
Exercise 1. A Good First Program
What You Should See
Study Drills
Common Student Questions
Exercise 2. Comments and Pound Characters
What You Should See
Study Drills
Common Student Questions
Exercise 3. Numbers and Math
What You Should See
Study Drills
Common Student Questions
Exercise 4. Variables and Names
What You Should See
Study Drills
Common Student Questions
Exercise 5. More Variables and Printing
What You Should See
Study Drills
Common Student Questions
Exercise 6. Strings and Text
What You Should See
Study Drills
Common Student Questions
Exercise 7. More Printing
What You Should See
Study Drills
Common Student Questions
Exercise 8. Printing, Printing
What You Should See
Study Drills
Common Student Questions
Exercise 9. Printing, Printing, Printing
What You Should See
Study Drills
Common Student Questions
Exercise 10. What Was That?
What You Should See
Escape Sequences
Study Drills
Common Student Questions
Exercise 11. Asking Questions
What You Should See
Study Drills
Common Student Questions
Exercise 12. Prompting People
What You Should See
Study Drills
Common Student Questions
Exercise 13. Parameters, Unpacking, Variables
Hold Up! Features Have Another Name
What You Should See
Study Drills
Common Student Questions
Exercise 14. Prompting and Passing
What You Should See
Study Drills
Common Student Questions
Exercise 15. Reading Files
What You Should See
Study Drills
Common Student Questions
Exercise 16. Reading and Writing Files
What You Should See
Study Drills
Common Student Questions
Exercise 17. More Files
What You Should See
Study Drills
Common Student Questions
Exercise 18. Names, Variables, Code, Functions
What You Should See
Study Drills
Common Student Questions
Exercise 19. Functions and Variables
What You Should See
Study Drills
Common Student Questions
Exercise 20. Functions and Files
What You Should See
Study Drills
Common Student Questions
Exercise 21. Functions Can Return Something
What You Should See
Study Drills
Common Student Questions
Exercise 22. What Do You Know So Far?
What You Are Learning
Exercise 23. Read Some Code
Exercise 24. More Practice
What You Should See
Study Drills
Common Student Questions
Exercise 25. Even More Practice
What You Should See
Study Drills
Common Student Questions
Exercise 26. Congratulations, Take a Test!
Common Student Questions
Exercise 27. Memorizing Logic
The Truth Terms
The Truth Tables
Common Student Questions
Exercise 28. Boolean Practice
What You Should See
Study Drills
Common Student Questions
Exercise 29. What If
What You Should See
Study Drills
Common Student Questions
Exercise 30. Else and If
What You Should See
Study Drills
Common Student Questions
Exercise 31. Making Decisions
What You Should See
Study Drills
Common Student Questions
Exercise 32. Loops and Lists
What You Should See
Study Drills
Common Student Questions
Exercise 33. While-Loops
What You Should See
Study Drills
Common Student Questions
Exercise 34. Accessing Elements of Lists
Study Drills
Exercise 35. Branches and Functions
What You Should See
Study Drills
Common Student Questions
Exercise 36. Designing and Debugging
Rules for If-Statements
Rules for Loops
Tips for Debugging
Homework
Exercise 37. Symbol Review
Keywords
Data Types
String Escape Sequences
String Formats
Operators
Reading Code
Study Drills
Common Student Questions
Exercise 38. Doing Things to Lists
What You Should See
Study Drills
Common Student Questions
Exercise 39. Dictionaries, Oh Lovely Dictionaries
What You Should See
Study Drills
Common Student Questions
Exercise 40. Modules, Classes, and Objects
Modules Are Like Dictionaries
What You Should See
Study Drills
Common Student Questions
Exercise 41. Learning to Speak Object Oriented
Word Drills
Phrase Drills
Combined Drills
A Reading Test
Practice English to Code
Reading More Code
Common Student Questions
Exercise 42. Is-A, Has-A, Objects, and Classes
How This Looks in Code
About class Name(object)
Study Drills
Common Student Questions
Exercise 43. Basic Object-Oriented Analysis and Design
The Analysis of a Simple Game Engine
Top Down vs. Bottom Up
The Code for “Gothons from Planet Percal #25”
What You Should See
Study Drills
Common Student Questions
Exercise 44. Inheritance vs. Composition
What is Inheritance?
The Reason for super()
Composition
When to Use Inheritance or Composition
Study Drills
Common Student Questions
Exercise 45. You Make a Game
Evaluating Your Game
Function Style
Class Style
Code Style
Good Comments
Evaluate Your Game
Exercise 46. A Project Skeleton
Installing Python Packages
Creating the Skeleton Project Directory
Testing Your Setup
Using the Skeleton
Required Quiz
Common Student Questions
Exercise 47. Automated Testing
Writing a Test Case
Testing Guidelines
What You Should See
Study Drills
Common Student Questions
Exercise 48. Advanced User Input
Our Game Lexicon
What You Should Test
Design Hints
Study Drills
Common Student Questions
Exercise 49. Making Sentences
Match and Peek
The Sentence Grammar
A Word on Exceptions
What You Should Test
Study Drills
Common Student Questions
Exercise 50. Your First Website
Installing lpthw.web
Make a Simple “Hello World” Project
What’s Going On?
Fixing Errors
Create Basic Templates
Study Drills
Common Student Questions
Exercise 51. Getting Input from a Browser
How the Web Works
How Forms Work
Creating HTML Forms
Creating a Layout Template
Writing Automated Tests for Forms
Study Drills
Common Student Questions
Exercise 52. The Start of Your Web Game
Refactoring the Exercise 43 Game
Sessions and Tracking Users
Creating an Engine
Your Final Exam
Common Student Questions
Next Steps
How to Learn Any Programming Language
Advice from an Old Programmer
Appendix. Command Line Crash Course
Introduction: Shut Up and Shell
Exercise 1: The Setup
Exercise 2: Paths, Folders, Directories (pwd)
Exercise 3: If You Get Lost
Exercise 4: Make a Directory (mkdir)
Exercise 5: Change Directory (cd)
Exercise 6: List Directory (ls)
Exercise 7: Remove Directory (rmdir)
Exercise 8: Move Around (pushd, popd)
Exercise 9: Make Empty Files (Touch, New-Item)
Exercise 10: Copy a File (cp)
Exercise 11: Move a File (mv)
Exercise 12: View a File (less, MORE)
Exercise 13: Stream a File (cat)
Exercise 14: Remove a File (rm)
Exercise 15: Exit Your Terminal (exit)
Command Line Next Steps
Index
Where Are the Companion Content Files?
← Prev
Back
Next →
← Prev
Back
Next →