Book description
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 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.)
Publisher resources
Table of contents
- Acknowledgments
- Preface
- 1. What’s Programming?
-
2. Hello, Python
- How Does a Computer Run a Python Program?
- Expressions and Values: Arithmetic in Python
- What Is a Type?
- Variables and Computer Memory: Remembering Values
- How Python Tells You Something Went Wrong
- A Single Statement That Spans Multiple Lines
- Describing Code
- Making Code Readable
- The Object of This Chapter
- Exercises
-
3. Designing and Using Functions
- Functions That Python Provides
- Memory Addresses: How Python Keeps Track of Values
- Defining Our Own Functions
- Using Local Variables for Temporary Storage
- Tracing Function Calls in the Memory Model
- Designing New Functions: A Recipe
- Writing and Running a Program
- Omitting a return Statement: None
- Dealing with Situations That Your Code Doesn’t Handle
- What Did You Call That?
- Exercises
- 4. Working with Text
- 5. Making Choices
- 6. A Modular Approach to Program Organization
- 7. Using Methods
- 8. Storing Collections of Data Using Lists
- 9. Repeating Code Using Loops
- 10. Reading and Writing Files
- 11. Storing Data Using Other Collection Types
- 12. Designing Algorithms
- 13. Searching and Sorting
- 14. Object-Oriented Programming
- 15. Testing and Debugging
- 16. Creating Graphical User Interfaces
- 17. Databases
- Bibliography
Product information
- Title: Practical Programming, 3rd Edition
- Author(s):
- Release date: December 2017
- Publisher(s): Pragmatic Bookshelf
- ISBN: 9781680502688
You might also like
book
Practical Programming, 2nd Edition
This book is for anyone who wants to understand computer programming. You'll learn to program in …
book
Modern Programming: Object Oriented Programming and Best Practices
Discover the untapped features of object-oriented programming and use it with other software tools to code …
book
Essential Algorithms, 2nd Edition
A friendly introduction to the most useful algorithms written in simple, intuitive English The revised and …
book
A Tour of C++, 2nd Edition
In Bjarne Stroustrup, the creator of C++, describes what constitutes modern C++. This concise, self-contained guide …