Think Python How to Think Like a Computer Scientist
Download 1.04 Mb. Pdf ko'rish
|
thinkpython
- Bu sahifa navigatsiya:
- Contents xix
- A Debugging 197
19 Case study: Tkinter
183 19.1 GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 19.2 Buttons and callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 19.3 Canvas widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 19.4 Coordinate sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Contents xix 19.5 More widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 19.6 Packing widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 19.7 Menus and Callables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 19.8 Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 19.9 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 19.10 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 19.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 A Debugging 197 A.1 Syntax errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 A.2 Runtime errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 A.3 Semantic errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 xx Contents Chapter 1 The way of the program The goal of this book is to teach you to think like a computer scientist. This way of thinking com- bines some of the best features of mathematics, engineering, and natural science. Like mathemati- cians, computer scientists use formal languages to denote ideas (specifically computations). Like engineers, they design things, assembling components into systems and evaluating tradeoffs among alternatives. Like scientists, they observe the behavior of complex systems, form hypotheses, and test predictions. The single most important skill for a computer scientist is problem solving. Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately. As it turns out, the process of learning to program is an excellent opportunity to practice problem-solving skills. That’s why this chapter is called, “The way of the program.” On one level, you will be learning to program, a useful skill by itself. On another level, you will use programming as a means to an end. As we go along, that end will become clearer. Download 1.04 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling