Practical Programming : An Introduction to Computer Science Using Python 3.6 (3TH)

個数:

Practical Programming : An Introduction to Computer Science Using Python 3.6 (3TH)

  • 提携先の海外書籍取次会社に在庫がございます。通常2週間で発送いたします。
    重要ご説明事項
    1. 納期遅延や、ご入手不能となる場合が若干ございます。
    2. 複数冊ご注文の場合、分割発送となる場合がございます。
    3. 美品のご指定は承りかねます。

  • 提携先の海外書籍取次会社に在庫がございます。通常約2週間で発送いたします。
    重要ご説明事項
    1. 納期遅延や、ご入手不能となる場合が若干ございます。
    2. 複数冊ご注文の場合、分割発送となる場合がございます。
    3. 美品のご指定は承りかねます。
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 383 p.
  • 言語 ENG,ENG
  • 商品コード 9781680502688
  • DDC分類 005

Full 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 and running Python programs. (If you use Linux, you may need to install Python 3.6 and IDLE separately.)

Table of Contents

Acknowledgments                                    xi
Preface xiii
1 What's Programming? 1 (6)
Programs and Programming 2 (1)
What's a Programming Language? 3 (1)
What's a Bug? 4 (1)
The Difference Between Brackets, Braces, 5 (1)
and Parentheses
Installing Python 5 (2)
2 Hello, Python 7 (24)
How Does a Computer Run a Python Program? 7 (2)
Expressions and Values: Arithmetic in 9 (3)
Python
What Is a Type? 12 (3)
Variables and Computer Memory: 15 (7)
Remembering Values
How Python Tells You Something Went Wrong 22 (1)
A Single Statement That Spans Multiple 23 (2)
Lines
Describing Code 25 (1)
Making Code Readable 26 (1)
The Object of This Chapter 27 (1)
Exercises 27 (4)
3 Designing and Using Functions 31 (34)
Functions That Python Provides 31 (3)
Memory Addresses: How Python Keeps Track 34 (1)
of Values
Defining Our Own Functions 35 (4)
Using Local Variables for Temporary 39 (1)
Storage
Tracing Function Calls in the Memory Model 40 (7)
Designing New Functions: A Recipe 47 (11)
Writing and Running a Program 58 (2)
Omitting a return Statement: None 60 (1)
Dealing with Situations That Your Code 61 (1)
Doesn't Handle
What Did You Call That? 62 (1)
Exercises 63 (2)
4 Working with Text 65 (12)
Creating Strings of Characters 65 (3)
Using Special Characters in Strings 68 (2)
Creating a Multiline String 70 (1)
Printing Information 70 (3)
Getting Information from the Keyboard 73 (1)
Quotes About Strings 74 (1)
Exercises 75 (2)
5 Making Choices 77 (22)
A Boolean Type 77 (9)
Choosing Which Statements to Execute 86 (6)
Nested if Statements 92 (1)
Remembering Results of a Boolean 92 (2)
Expression Evaluation
You Learned About Booleans: True or False? 94 (1)
Exercises 94 (5)
6 A Modular Approach to Program Organization 99 (16)
Importing Modules 100 (4)
Defining Your Own Modules 104 (6)
Testing Your Code Semiautomatically 110 (2)
Tips for Grouping Your Functions 112 (1)
Organizing Our Thoughts 113 (1)
Exercises 113 (2)
7 Using Methods 115 (14)
Modules, Classes, and Methods 115 (2)
Calling Methods the Object-Oriented Way 117 (2)
Exploring String Methods 119 (4)
What Are Those Underscores? 123 (2)
A Methodical Review 125 (1)
Exercises 126 (3)
8 Storing Collections of Data Using Lists 129 (20)
Storing and Accessing Data in Lists 129 (4)
Type Annotations for Lists 133 (1)
Modifying Lists 133 (2)
Operations on Lists 135 (2)
Slicing Lists 137 (2)
Aliasing: What's in a Name? 139 (2)
List Methods 141 (1)
Working with a List of Lists 142 (3)
A Summary List 145 (1)
Exercises 145 (4)
9 Repeating Code Using Loops 149 (24)
Processing Items in a List 149 (2)
Processing Characters in Strings 151 (1)
Looping Over a Range of Numbers 152 (2)
Processing Lists Using Indices 154 (2)
Nesting Loops in Loops 156 (4)
Looping Until a Condition Is Reached 160 (2)
Repetition Based on User Input 162 (1)
Controlling Loops Using break and continue 163 (4)
Repeating What You've Learned 167 (1)
Exercises 168 (5)
10 Reading and Writing Files 173 (30)
What Kinds of Files Are There? 173 (2)
Opening a File 175 (4)
Techniques for Reading Files 179 (4)
Files over the Internet 183 (2)
Writing Files 185 (1)
Writing Example Calls Using StringlO 186 (2)
Writing Algorithms That Use the 188 (7)
File-Reading Techniques
Multiline Records 195 (3)
Looking Ahead 198 (2)
Notes to File Away 200 (1)
Exercises 201 (2)
11 Storing Data Using Other Collection Types 203 (26)
Storing Data Using Sets 203 (6)
Storing Data Using Tuples 209 (5)
Storing Data Using Dictionaries 214 (8)
Inverting a Dictionary 222 (1)
Using the in Operator on Tuples, Sets, 223 (1)
and Dictionaries
Comparing Collections 224 (1)
Creating New Type Annotations 224 (2)
A Collection of New Information 226 (1)
Exercises 226 (3)
12 Designing Algorithms 229 (14)
Searching for the Two Smallest Values 230 (8)
Timing the Functions 238 (2)
At a Minimum, You Saw This 240 (1)
Exercises 240 (3)
13 Searching and Sorting 243 (32)
Searching a List 243 (7)
Binary Search 250 (6)
Sorting 256 (9)
More Efficient Sorting Algorithms 265 (1)
Merge Sort: A Faster Sorting Algorithm 266 (4)
Sorting Out What You Learned 270 (2)
Exercises 272 (3)
14 Object-Oriented Programming 275 (28)
Understanding a Problem Domain 276 (1)
Function isinstance, Class object, and 277 (3)
Class Book
Writing a Method in Class Book 280 (5)
Plugging into Python Syntax: More Special 285 (3)
Methods
A Little Bit of OO Theory 288 (5)
A Case Study: Molecules, Atoms, and PDB 293 (4)
Files
Classifying What You've Learned 297 (1)
Exercises 298 (5)
15 Testing and Debugging 303 (18)
Why Do You Need to Test? 303 (1)
Case Study: Testing above_freezing 304 (5)
Case Study: Testing running_sum 309 (6)
Choosing Test Cases 315 (1)
Hunting Bugs 316 (1)
Bugs We've Put in Your Ear 317 (1)
Exercises 317 (4)
16 Creating Graphical User Interfaces 321 (22)
Using Module tkinter 321 (2)
Building a Basic GUI 323 (4)
Models, Views, and Controllers, Oh My! 327 (4)
Customizing the Visual Style 331 (4)
Introducing a Few More Widgets 335 (3)
Object-Oriented GUIs 338 (1)
Keeping the Concepts from Being a GUI Mess 339 (1)
Exercises 340 (3)
17 Databases 343 (26)
Overview 343 (1)
Creating and Populating 344 (4)
Retrieving Data 348 (3)
Updating and Deleting 351 (1)
Using NULL for Missing Data 352 (1)
Using Joins to Combine Tables 353 (4)
Keys and Constraints 357 (1)
Advanced Features 358 (6)
Some Data Based On What You Learned 364 (1)
Exercises 365 (4)
Bibliography 369 (2)
Index 371