Session 3: Booleans, Sequences, Iteration, and Strings¶
Booleans, Sequences, Iteration, and Strings
Pre-class prep¶
Read: Boolean Expressions
Read: Python Sequences
Read: Iteration
Read: Strings
Supplemental Reading:¶
Think Python, chapters 7 – 10 (11, 12)
(http://greenteapress.com/thinkpython/html/thinkpython008.html)
Dive Into Python: chapters 3, 4
In-class Activities¶
Working with Booleans, Conditional Expressions, etc¶
Re-write a couple CodingBat exercises, returning the direct boolean results, and/or using ternary expressions.
Variable Scope¶
Experiment with locals
by adding this statement one of the functions we wrote last week (or any other function you wrote):
print(locals())
Mailroom Exercises¶
You’ve now got the basics of the language down – enough to write the first full “program”:
Post-class Activites¶
Finish the mailroom project.
And the other exercises
Look at the next session for reading, etc: