Think Python How to Think Like a Computer Scientist
Download 1.04 Mb. Pdf ko'rish
|
thinkpython
- Bu sahifa navigatsiya:
- Contents Preface v 1 The way of the program 1
x
Chapter 0. Preface • Patryk Wolowiec helped me with a problem in the HTML version. • Mark Chonofsky told me about a new keyword in Python 3.0. • Russell Coleman helped me with my geometry. • Wei Huang spotted several typographical errors. • Karen Barber spotted the the oldest typo in the book. • Nam Nguyen found a typo and pointed out that I used the Decorator pattern but didn’t mention it by name. • St´ephane Morin sent in several corrections and suggestions. • Paul Stoop corrected a typo in uses_only. • Eric Bronner pointed out a confusion in the discussion of the order of operations. Contents Preface v 1 The way of the program 1 1.1 The Python programming language . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 What is a program? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 What is debugging? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Formal and natural languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.5 The first program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.6 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.7 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2 Variables, expressions and statements 9 2.1 Values and types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3 Variable names and keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.4 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.5 Operators and operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.6 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.7 Order of operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.8 String operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.9 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.10 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.11 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling