Начать новую тему Ответить на тему
Статистика раздачи
Размер: 11.93 МБ | | Скачали: 19
Сидеров: 0  [0 байт/сек]    Личеров: 0  [0 байт/сек]
Пред. тема | След. тема 

Автор
Сообщение

Ответить с цитатой 

Python Programming Fundamentals (2nd edition)

Год: 2014
Автор: Kent D. Lee
Жанр: Программирование
Издательство: Springer
ISBN: 978-1447166412
Серия: Undergraduate Topics in Computer Science
Язык: Английский
Формат: PDF/EPUB
Качество: Изначально компьютерное (eBook)
Интерактивное оглавление: Да

Количество страниц: 239
Описание: This easy-to-follow and classroom-tested textbook guides the reader through the fundamentals of programming with Python, an accessible language which can be learned incrementally. Features: incudes numerous examples and practice exercises throughout the text, with additional exercises, solutions and review questions at the end of each chapter; highlights the patterns which frequently appear when writing programs, reinforcing the application of these patterns for problem-solving through practice exercises; introduces the use of a debugger tool to inspect a program, enabling students to discover for themselves how programs work and enhance their understanding; presents the Tkinter framework for building graphical user interface applications and event-driven programs; provides instructional videos and additional information for students, as well as support materials for instructors, at an associated website.
Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 The Python Programming Language . . . . . . . . . . . . . . . . . . . 2
1.2 Installing Python and Wing IDE 101. . . . . . . . . . . . . . . . . . . 3
1.3 Writing Your First Program . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 What Is a Computer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Binary Number Representation . . . . . . . . . . . . . . . . . . . . . . . 10
1.6 What Is a Programming Language?. . . . . . . . . . . . . . . . . . . . 13
1.7 Hexadecimal and Octal Representation . . . . . . . . . . . . . . . . . 15
1.8 Writing Your Second Program . . . . . . . . . . . . . . . . . . . . . . . 17
1.9 Syntax Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.10 Types of Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.11 The Reference Type and Assignment Statements . . . . . . . . . . 20
1.12 Integers and Real Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.13 Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.14 Integer to String Conversion and Back Again. . . . . . . . . . . . . 25
1.15 Getting Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.16 Formatting Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.17 When Things Go Wrong . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.18 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.19 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.20 Solutions to Practice Problems . . . . . . . . . . . . . . . . . . . . . . . 36
2 Decision Making. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.1 Finding the Max of Three Integers . . . . . . . . . . . . . . . . . . . . 43
2.2 The Guess and Check Pattern . . . . . . . . . . . . . . . . . . . . . . . . 45
2.3 Choosing from a List of Alternatives. . . . . . . . . . . . . . . . . . . 46
2.4 The Boolean Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.5 Short Circuit Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.6 Comparing Floats for Equality . . . . . . . . . . . . . . . . . . . . . . . 51
2.7 Exception Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.8 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.10 Solutions to Practice Problems . . . . . . . . . . . . . . . . . . . . . . . 58
3 Repetitive Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.1 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.2 Iterating Over a Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.3 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.4 The Guess and Check Pattern for Lists . . . . . . . . . . . . . . . . . 72
3.5 Mutability of Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.6 The Accumulator Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
3.7 Reading from and Writing to a File. . . . . . . . . . . . . . . . . . . . 78
3.8 Reading Records from a File . . . . . . . . . . . . . . . . . . . . . . . . 80
3.9 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
3.11 Solutions to Practice Problems . . . . . . . . . . . . . . . . . . . . . . . 86
4 Using Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
4.2 Accessor Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4.3 Mutator Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4.4 Immutable Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.5 Object-Oriented Programming . . . . . . . . . . . . . . . . . . . . . . . 98
4.6 Working with XML Files. . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4.7 Extracting Elements from an XML File . . . . . . . . . . . . . . . . . 101
4.8 XML Attributes and Dictionaries . . . . . . . . . . . . . . . . . . . . . 102
4.9 Reading an XML File and Building Parallel Lists . . . . . . . . . . 103
4.10 Using Parallel Lists to Draw a Picture . . . . . . . . . . . . . . . . . . 105
4.11 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
4.12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
4.13 Solutions to Practice Problems . . . . . . . . . . . . . . . . . . . . . . . 110
5 Defining Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.1 Why Write Functions?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.2 Passing Arguments and Returning a Value. . . . . . . . . . . . . . . 117
5.3 Scope of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.4 The Run-Time Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
5.5 Mutable Data and Functions. . . . . . . . . . . . . . . . . . . . . . . . . 125
5.6 Predicate Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
5.7 Top-Down Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
5.8 Bottom-Up Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
5.9 Recursive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
5.10 The Main Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
5.11 Keyword Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
5.12 Default Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
5.13 Functions with Variable Number of Parameters . . . . . . . . . . . 135
5.14 Dictionary Parameter Passing . . . . . . . . . . . . . . . . . . . . . . . . 136
5.15 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.16 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.17 Solutions to Practice Problems . . . . . . . . . . . . . . . . . . . . . . . 140
6 Event-Driven Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
6.1 The Root Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
6.2 Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
6.3 Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
6.4 The Text Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
6.5 The Button Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
6.6 Creating a Reminder! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
6.7 Finishing up the Reminder! Application. . . . . . . . . . . . . . . . . 152
6.8 Label and Entry Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
6.9 Layout Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
6.10 Message Boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
6.11 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
6.12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
6.13 Solutions to Practice Problems . . . . . . . . . . . . . . . . . . . . . . . 160
7 Defining Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
7.1 Creating an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
7.2 Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
7.3 A Bouncing Ball Example . . . . . . . . . . . . . . . . . . . . . . . . . . 174
7.4 Polymorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
7.5 Getting Hooked on Python. . . . . . . . . . . . . . . . . . . . . . . . . . 177
7.6 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
7.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
7.8 Solutions to Practice Problems . . . . . . . . . . . . . . . . . . . . . . . 186
8 Appendix A: Integer Operators. . . . . . . . . . . . . . . . . . . . . . . . . . 189
9 Appendix B: Float Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
10 Appendix C: String Operators and Methods . . . . . . . . . . . . . . . . 193
11 Appendix D: List Operators and Methods . . . . . . . . . . . . . . . . . . 197
12 Appendix E: Dictionary Operators and Methods . . . . . . . . . . . . . 199
13 Appendix F: Turtle Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
14 Appendix G: TurtleScreen Methods. . . . . . . . . . . . . . . . . . . . . . . 213
15 Appendix H: The Reminder! Program. . . . . . . . . . . . . . . . . . . . . 221
16 Appendix I: The Bouncing Ball Program. . . . . . . . . . . . . . . . . . . 225
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Правила, инструкции, FAQ!!!
Торрент   Скачать торрент Магнет ссылка
Скачать торрент
[ Размер 4.52 КБ / Просмотров 87 ]

Статус
Проверен 
 
Размер  11.93 МБ
Приватный: Нет (DHT включён)
.torrent скачан  19
Как залить торрент? | Как скачать Torrent? | Ошибка в торренте? Качайте магнет  


     Отправить личное сообщение
   
Страница 1 из 1
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему


Сейчас эту тему просматривают: нет зарегистрированных пользователей и гости: 1


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Перейти:  
Ресурс не предоставляет электронные версии произведений, а занимается лишь коллекционированием и каталогизацией ссылок, присылаемых и публикуемых на форуме нашими читателями. Если вы являетесь правообладателем какого-либо представленного материала и не желаете чтобы ссылка на него находилась в нашем каталоге, свяжитесь с нами и мы незамедлительно удалим её. Файлы для обмена на трекере предоставлены пользователями сайта, и администрация не несёт ответственности за их содержание. Просьба не заливать файлы, защищенные авторскими правами, а также файлы нелегального содержания!