JMU
Updating
A Programming Pattern (With Examples in Python)


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu


Motivation
Thinking About the Problem
Thinking About the Problem (cont.)
Thinking About the Problem (cont.)
The Pattern
A Gradebook Example
pythonexamples/programmingpatterns/Updating.py (Fragment: grade)
        
A Retail Sales Example
pythonexamples/programmingpatterns/Updating.py (Fragment: sales)
        
A Banking Example
pythonexamples/programmingpatterns/Updating.py (Fragment: banking)
        
Compound Assignment Operators
A Warning