Table of Contents¶
1. General Intro¶
2. Simple Python Data¶
3. Debugging¶
4. Modules (and Turtles!)¶
- 1. Hello Little Turtles!
- 2. Our First Turtle Program
- 3. Instances — A Herd of Turtles
- 4. The for Loop
- 5. Flow of Execution of the for Loop
- 6. Iteration Simplifies Our Turtle Program
- 7. The range Type
- 8. A Few More turtle Methods and Observations
- 9. Summary of Turtle Methods
- 10. Modules and Getting Help
- 11. More About Using Modules
- 12. The math module
- 13. The random module
- 14. Glossary
- 15. Exercises
5. Functions¶
- 1. Functions
- 2. Functions That Return Values
- 3. Parameters and Local Variables
- 4. The Accumulator Pattern
- 5. Functions Can Call Other Functions
- 6. Flow of Execution Summary
- 7. Using a main Function
- 8. Program Development
- 9. Composition
- 10. A Turtle Bar Chart
- 11. Programming With Style
- 12. Glossary
- 13. Exercises
6. Selection¶
7. Exceptions and Problem Solving¶
8. More About Iteration¶
9. Strings¶
10. Lists¶
- 1. Lists
- 2. Lists and Strings are Similar
- 3. Lists Are Mutable
- 4. List Methods
- 5. Lists and for loops
- 6. Concatenation and Repetition
- 7. Objects and References
- 8. Aliasing and Cloning Lists
- 9. Repetition and References
- 10. Using Lists as Parameters
- 11. List Comprehensions
- 12. split and join
- 13. Glossary
- 14. Exercises
11. Dictionaries and Tuples¶
12. Classes and Objects — Basics¶
- 1. Object-oriented programming
- 2. A Change of Perspective
- 3. Objects Revisited
- 4. User Defined Classes
- 5. Improving our Constructor
- 6. Adding Other Methods to our Class
- 7. Objects as Arguments and Parameters
- 8. Converting an Object to a String
- 9. Instances as Return Values
- 10. Glossary
- 11. Exercises
13. Classes and Objects — Digging Deeper¶
Studios¶
External Assignments¶
Optional Chapters¶
Hacker Chapter: Files¶
Hacker Chapter: Recursion¶
Hacker Chapter: Special Topic – L-Systems¶
More about this Textbook¶
This book is one of many adapted versions of the open-source textbook called How to Think Like A Computer Scientist: Learning with Python, which is used in many universities around the world.
Runestone is a platform for hosting interactive electronic textbooks. The folks at Runestone created ThinkCsPy, an interactive version of the original book.
LaunchCode, a non-profit in St Louis, customized Runestone’s ThinkCsPy.
Devetry made some additional customizations, resulting in the book you are reading!