maintainable without too much effort • Software design technique to split your code into separate parts • The focus for this separation should be to have modules with no or just few dependencies upon other modules • Minimization of dependencies is the goal • The executable application will be created by putting separate module together.
import add print '2 + 3 is equal to : %d ' % add(2, 3) print '10 - 3 is equal to : %d ' % sub(10, 3) ~ $ ./testcalc.py 2 + 3 is equal to : 5 Traceback (most recent call last): File "./testcalc.py", line 6, in <module> print '10 - 3 is equal to : %d ' % sub(10,3) NameError: name 'sub' is not defined
Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/3.0/ Copyright 2013 Mohammad Reza Kamalifard All rights reserved. Go to Kamalifard.ir/pysec101 to Download Slides and Course martials .