Summary


In this chapter, you learned to write your own functions. You then saw how to accept and return values in your functions. You learned about namespaces and saw how global variables can be accessed and changed from within functions. You also learned to limit your use of global variables, but saw how to use global constants when necessary. You even dabbled ever so slightly in some artificial intelligence concepts to create a computer opponent in a game of strategy.




Python Programming for the Absolute Beginner
Python Programming for the Absolute Beginner, 3rd Edition
ISBN: 1435455002
EAN: 2147483647
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net