A Primer on Scientific Programming with PythonSpringer Science & Business Media, 7. aug. 2009 - 694 sider Theaimofthisbookistoteachcomputerprogrammingusingexamples from mathematics and the natural sciences. We have chosen to use the Python programming language because it combines remarkable power with very clean, simple, and compact syntax. Python is easy to learn and very well suited for an introduction to computer programming. Python is also quite similar to Matlab and a good language for doing mathematical computing. It is easy to combine Python with compiled languages, like Fortran, C, and C++, which are widely used languages forscienti?ccomputations.AseamlessintegrationofPythonwithJava is o?ered by a special version of Python called Jython. The examples in this book integrate programming with appli- tions to mathematics, physics, biology, and ?nance. The reader is - pected to have knowledge of basic one-variable calculus as taught in mathematics-intensive programs in high schools. It is certainly an - vantage to take a university calculus course in parallel, preferably c- taining both classical and numerical aspects of calculus. Although not strictly required, a background in high school physics makes many of the examples more meaningful. |
Innhold
| 1 | |
| 13 | |
1 Compute 1+1 | 42 |
15 Find errors in the coding of formulas | 48 |
Basic Constructions | 51 |
1 Make a FahrenheitCelsius conversion table | 99 |
Input Data and Error Handling | 119 |
Array Computing and Curve Plotting | 169 |
Files Strings and Dictionaries | 269 |
Reading Coordinates | 298 |
Random Numbers and Simple Games | 417 |
ObjectOriented Programming | 479 |
A Discrete Calculus | 573 |
9 | 605 |
CA Complete Project | 625 |
Debugging | 651 |
Interactive Plotting Sessions | 189 |
Index | 211 |
Sequences and Difference Equations | 235 |
E Technical Topics | 669 |
| 687 | |
Andre utgaver - Vis alle
Vanlige uttrykk og setninger
algorithm approximation array Bisection method boolean Celsius Chapter column command line command-line arguments compute constructor corresponding curve def __init__(self def f(x defined derivative dictionary difference equation differential Easyviz elif error eval evaluate example Exer Exercise expression float object folder formula function f(x global variables implementation infile initial input inside instance int object integer integral iterations keyword arguments linspace list comprehension list element loop math import method module file Name of program nested list Newton's method Numerical Python numpy operations output parameters plot plot(t points polynomial problem program file Python function Python program random numbers range(1 real numbers result round-off errors run the program Runge-Kutta method scitools.std import sequence solution solve statement string StringFunction subclass superclass syntax temperature terminal window tion tuple vector velocity write zero
