Table of Content
Preface 1 Acknowledgments 1 The Hard Way Is Easier 1 Do Not Copy-Paste 2 A Note on Practice and Persistence 3 A Warning for the Smarties 3 Exercise 0: The Setup 6 Mac OSX 6 Windows 7 Linux 9 Warnings for Beginners 10 Exercise 1: A Good First Program 12 What You Should See 14 Study Drills 15 Common Student Questions 16 Exercise 2: Comments and Pound Characters 18 What You Should See 18 Study Drills 18 Common Student Questions 19 Exercise 3: Numbers and Math 20 What You Should See 21 Study Drills 21 Common Student Questions 22 Exercise 4: Variables and Names 24 What You Should See 25 Study Drills 25 Common Student Questions 25 Exercise 5: More Variables and Printing 28 What You Should See 28 Study Drills 29 Common Student Questions 29 Exercise 6: Strings and Text 30 What You Should See 31 Study Drills 31 Common Student Questions 31 Exercise 7: More Printing. 32 What You Should See 32 Study Drills 32 Common Student Questions 33 Exercise 8: Printing, Printing 34 What You Should See 34 Study Drills 34 Common Student Questions 34 Exercise 9: Printing, Printing, Printing 36 What You Should See 36 Study Drills 36 Common Student Questions 37 Exercise 10: What Was That? 38 What You Should See 39 Escape Sequences 39 Study Drills 40 Common Student Questions 40 Exercise 11: Asking Questions 42 What You Should See 42 Study Drills 43 Common Student Questions 43 Exercise 12: Prompting People 44 What You Should See 44 Study Drills 44 Common Student Questions 45 Exercise 13: Parameters, Unpacking, Variables 46 Hold Up! Features Have Another Name 46 What You Should See 47 Study Drills 48 Common Student Questions 48 Exercise 14: Prompting and Passing 50 What You Should See 50 Study Drills 51 Common Student Questions 51 Exercise 15: Reading Files 54 What You Should See 55 Study Drills 55 Common Student Questions 56 Exercise 16: Reading and Writing Files 58 What You Should See 59 Study Drills 59 Common Student Questions 60 Exercise 17: More Files 62 What You Should See 63 Study Drills 63 Common Student Questions 63 Exercise 18: Names, Variables, Code, Functions 66 What You Should See 67 Study Drills 68 Common Student Questions 68 Exercise 19: Functions and Variables 70 What You Should See 71 Study Drills 71 Common Student Questions 71 Exercise 20: Functions and Files 74 Wh