Ideally, each statement advances the state of the computation from an initial condition toward the desired final outcome. This "advances the computation" assertion can be challenging to prove. One approach is to define the final state, identify a statement that will establish this final state, and then deduce the precondition required for this final statement to work. This design process can be iterated until an acceptable initial state is derived.
imperative programming as changing state of variables.
Share this highlighthttp://www.safaribooksonline.com/a/functional-python-programming/883273/