Tuesday¶
Objectives¶
- Deepen our understanding of functions in Python, including scoping and recursion
- Build a strong knowledgs of Boolean values, and how to use them Pythonically
- Learn a bit about looping and the basic container types
- Discover Modules, Packages and namespaces and learn to import names
- Learn about TDD principles
- Develop a small project using TDD and pytest
Readings¶
- http://effbot.org/zone/import-confusion.htm
- Watch Ned Batchelder from the EdX project talk about testing (~40 min)
Review¶
Review materials from the previous lesson:
- Values and Types
- Expressions and Statements
- Symbols and Binding
- Blocks
- Introduction to Functions
- REPL, iPython,
help
, anddir
Concepts¶
Demo¶
- Recursion
- Conditionals and Boolean Return Values
- Test Driven Development with pytest
Assignments¶
If you finish those, spend time running through the next four chapters of How to Think Like a Computer Scientist Sign up for an account and read and work through the exercises in:
- Chapter 4: Python Turtle Graphics
- Chapter 5: Python Modules
- Chapter 6: Functions
- Chapter 7: Selection
There is no submission for these review materials.