Fourth Edition
Tony Gaddis
Haywood Community College
Contents in a Glance
1. Preface xiii
1. Chapter 1 Introduction to Computers and Programming 1
2. Chapter 2 Input, Processing, and Output 31
3. Chapter 3 Decision Structures and Boolean Logic 109
4. Chapter 4 Repetition Structures 159
5. Chapter 5 Functions 209
6. Chapter 6 Files and Exceptions 287
7. Chapter 7 Lists and Tuples 343
8. Chapter 8 More About Strings 407
9. Chapter 9 Dictionaries and Sets 439
10. Chapter 10 Classes and Object-Oriented Programming 489
11. Chapter 11 Inheritance 551
12. Chapter 12 Recursion 577
13. Chapter 13 GUI Programming 597
1. Appendix A Installing Python 659
2. Appendix B Introduction to IDLE 663
3. Appendix C The ASCII Character Set 671
4. Appendix D Predefined Named Colors 673
5. Appendix E More About the import Statement 679
6. Appendix F Installing Modules with the pip Utility 683
7. Appendix G Answers to Checkpoints 685