Computes
compound interest, to find the final amount.
This is an example application of Python.
The useful code is minimum, and most of it is related to plotting,
as (more general) 'gnuplot' is used, instead of native
'matplotlib'.
Advantage is taken from: PHP,
for the web page; Python for the numerical segment;
and 'gnuplot', for plotting.
Draws a plot of the computed amounts.
Computation structure — A PHP file
(this page: 'P-interest.php') calls (via
'action=...') an intermediate PHP file ('Interest.php'), which
(through $_POST) sends the problem data as command line arguments to
a Python script. This last does the computing, and makes
'system' call(s) to 'gnuplot', for the final (temporary) webpage.
Files involved:
P-interest.php (this one),
Interest.php,
interest.py.
Keywords: PHP, command line arguments,
Python script, gnuplot. |