Numerical Methods in Engineering with Python

This chapter is not a comprehensive manual of Python. Its sole aim is to provide sufficient information to give you a good start if you are unfamiliar with Python. If you know another computer language, and presumably you do, it is not difficult to pick up the rest as you go.
Python is an object-oriented language that was developed in late 1980s as a scripting language (the name is derived from the British television show Monty Python s Flying Circus). Although Python is not as well known in engineering circles as some other languages, it has a considerable following in the programming community in fact, Python is considerably more widespread than Fortran. Python may be viewed as an emerging language, since it is still being developed and refined. In the current state, it is an excellent language for developing engineering applications it possesses a simple elegance that other programming languages cannot match.
Python programs are not compiled into machine code, but are run by an inter preter [1]. The great advantage of an interpreted language is that programs can be tested and debugged quickly, allowing the user to concentrate more on the principles behind the program and less on programming itself. Since there is no need to compile, link and execute after each correction, Python programs can be developed in a much shorter time than equivalent Fortran or C programs. On the negative side, interpreted programs do not produce stand-alone applications. Thus a Python program can be...