Practical Programming. An Introduction to Computer Science using Python 3.6 [3rd ed.]
معرفی کتاب «Practical Programming. An Introduction to Computer Science using Python 3.6 [3rd ed.]» نوشتهٔ Paul Gries; Jennifer Campbell; Jason Montojo; Tammy Coron، منتشرشده توسط نشر Pragmatic Bookshelf در سال 2017. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Practical Programming. An Introduction to Computer Science using Python 3.6 [3rd ed.]» در دستهٔ بدون دستهبندی قرار دارد.
Classroom-tested by tens of thousands of students, this new edition of the bestselling intro to programming book is for anyone who wants to understand computer science. Learn about design, algorithms, testing, and debugging. Discover the fundamentals of programming with Python 3.6--a language that's used in millions of devices. Write programs to solve real-world problems, and come away with everything you need to produce quality code. This edition has been updated to use the new language features in Python 3.6. No programming experience required! Incremental examples show you the steps and missteps that happen while developing programs, so you know what to expect when you tackle a problem on your own. Inspired by "How to Design Programs" (HtDP), discover a five-step recipe for designing functions, which helps you learn the concepts--and becomes an integral part of writing programs. In this detailed introduction to Python and to computer programming, find out exactly what happens when your programs are executed. Work with numbers, text, big data sets, and files using real-world examples. Create and use your own data types. Make your programs reliable, work with databases, download data from the web automatically, and build user interfaces. As you use the fundamental programming tools in this book, you'll see how to document and organize your code so that you and other programmers can more easily read and understand it. This new edition takes advantage of Python 3.6's new features, including type annotations on parameters, return types and variable declarations, and changes to string formatting. Most importantly, you'll learn how to think like a professional programmer. What You Need: You'll need to download Python 3.6, available from (https://python.org.With) https://python.org.With that download comes IDLE, the editor we use for writing andrunning Python programs. (If you use Linux, you may need to installPython 3.6 and IDLE separately.) Contents......Page 3 Preface......Page 8 1 What's Programming......Page 11 Programs and Programming......Page 12 What's a Programming Language?......Page 13 What's a Bug?......Page 14 Installing Python......Page 15 How Does a Computer Run a Python Program?......Page 16 Expressions and Values: Arithmetic in Python......Page 18 What Is a Type?......Page 21 Variables and Computer Memory: Remembering Values......Page 24 How Python Tells You Something Went Wrong......Page 31 A Single Statement That Spans Multiple Lines......Page 32 Describing Code......Page 34 Making Code Readable......Page 35 Exercises......Page 36 Functions That Python Provides......Page 39 Memory Addresses: How Python Keeps Track of Values......Page 42 Defining Our Own Functions......Page 43 Using Local Variables for Temporary Storage......Page 47 Tracing Function Calls in the Memory Model......Page 48 Designing New Functions: A Recipe......Page 55 Writing and Running a Program......Page 66 Omitting a return Statement: None......Page 68 Dealing with Situations That Your Code Doesn’t Handle......Page 69 What Did You Call That?......Page 70 Exercises......Page 71 Creating Strings of Characters......Page 73 Using Special Characters in Strings......Page 76 Printing Information......Page 78 Getting Information from the Keyboard......Page 81 Quotes About Strings......Page 82 Exercises......Page 83 A Boolean Type......Page 85 Choosing Which Statements to Execute......Page 94 Remembering Results of a Boolean Expression Evaluation......Page 100 Exercises......Page 102 6 Modular Approach to Program Organization......Page 106 Importing Modules......Page 107 Defining Your Own Modules......Page 111 Testing Your Code Semiautomatically......Page 117 Tips for Grouping Your Functions......Page 119 Exercises......Page 120 Modules, Classes, and Methods......Page 122 Calling Methods the Object-Oriented Way......Page 124 Exploring String Methods......Page 126 What Are Those Underscores?......Page 130 A Methodical Review......Page 132 Exercises......Page 133 Storing and Accessing Data in Lists......Page 135 Modifying Lists......Page 139 Operations on Lists......Page 141 Slicing Lists......Page 143 Aliasing: What's in a Name?......Page 145 List Methods......Page 147 Working with a List of Lists......Page 148 Exercises......Page 151 Processing Items in a List......Page 154 Processing Characters in Strings......Page 156 Looping Over a Range of Numbers......Page 157 Processing Lists Using Indices......Page 159 Nesting Loops in Loops......Page 161 Looping Until a Condition Is Reached......Page 165 Repetition Based on User Input......Page 167 Controlling Loops Using break and continue......Page 168 Repeating What You've Learned......Page 172 Exercises......Page 173 What Kinds of Files Are There?......Page 177 Opening a File......Page 179 Techniques for Reading Files......Page 183 Files over the Internet......Page 187 Writing Files......Page 189 Writing Example Calls Using StringIO......Page 190 Writing Algorithms That Use the File-Reading Techniques......Page 192 Multiline Records......Page 199 Looking Ahead......Page 202 Notes to File Away......Page 204 Exercises......Page 205 Storing Data Using Sets......Page 206 Storing Data Using Tuples......Page 212 Storing Data Using Dictionaries......Page 217 Inverting a Dictionary......Page 225 Using the in Operator on Tuples, Sets, and Dictionaries......Page 226 Creating New Type Annotations......Page 227 Exercises......Page 229 12 Designing Algorithms......Page 232 Searching for the Two Smallest Values......Page 233 Timing the Functions......Page 241 Exercises......Page 243 Searching a List......Page 246 Binary Search......Page 253 Sorting......Page 259 More Efficient Sorting Algorithms......Page 268 Merge Sort: A Faster Sorting Algorithm......Page 269 Sorting Out What You Learned......Page 273 Exercises......Page 275 14 OOP......Page 277 Understanding a Problem Domain......Page 278 Function isinstance, Class object, and Class Book......Page 279 Writing a Method in Class Book......Page 282 Plugging into Python Syntax: More Special Methods......Page 287 A Little Bit of OO Theory......Page 290 A Case Study: Molecules, Atoms, and PDB Files......Page 295 Classifying What You've Learned......Page 299 Exercises......Page 300 Why Do You Need to Test?......Page 304 Case Study: Testing above_freezing......Page 305 Case Study: Testing running_sum......Page 310 Choosing Test Cases......Page 316 Hunting Bugs......Page 317 Exercises......Page 318 Using Module tkinter......Page 322 Building a Basic GUI......Page 324 Models, Views, and Controllers, Oh My!......Page 328 Customizing the Visual Style......Page 332 Introducing a Few More Widgets......Page 336 Object-Oriented GUIs......Page 339 Keeping the Concepts from Being a GUI Mess......Page 340 Exercises......Page 341 Overview......Page 343 Creating and Populating......Page 344 Retrieving Data......Page 348 Updating and Deleting......Page 351 Using NULL for Missing Data......Page 352 Using Joins to Combine Tables......Page 353 Keys and Constraints......Page 357 Advanced Features......Page 358 Some Data Based On What You Learned......Page 364 Exercises......Page 365 Biblio......Page 368 Index......Page 369 Classroom-tested by tens of thousands of students, this new edition of the bestselling intro to programming book is for anyone who wants to understand computer science. Learn about design, algorithms, testing, and debugging. Discover the fundamentals of programming with Python, including the new features in Python 3.6. Learn about design, algorithms, testing, and debugging. Write programs to solve real-world problems, and come away with everything you need to produce quality code Annotation Computers are used in every part of science from ecology to particle physics. This introduction to computer science continually reinforces those ties by using real-world science problems as examples Paul Gries, Jennifer Campbell, Jason Montojo. Place Of Publication From Publisher's Website. Includes Bibliographical References.
دانلود کتاب Practical Programming. An Introduction to Computer Science using Python 3.6 [3rd ed.]