CS 149
Professor: Alvin Chao
What is 20/3 + 5*8 - 4?
"Answer to the Ultimate Question of Life, the Universe, and Everything"
Hitchhikers Guide to the Galaxy
Circle math
�
Clock Arithmetic
Clock Arithmetic(contd.)
Other Time/Date examples
Another time example
“Twenty-nine days” means the same thing as “Four weeks and one day”. If days is a Python integer variable containing some number of days, develop expressions for:
Even/Odd Numbers
Cycling through a Set
Divisibility: Census Example
Digit Manipulation
In practice
Operations
Binary Operators
Unary Operators
Math module
Must do import math at top of program to use these:
Parts of this activity are based on materials developed by David Bernstein
</end>