Missing page.
Sorry. The page you requested does not exist on the Department of Computer Science website
[an error occurred while processing this directive]
File: index.shtml
Creator: George Ferguson
Created: Mon Oct 15 13:24:55 2012
Time-stamp: Sorry. The page you requested does not exist on the Department of Computer Science website
Use your function in a page that asks a user for the initial sum of
money, and prints a table with the future value at 1%, 3%, and 5%
return for 1, 5, and 10 years each. That is, the rows of the table are
the different interest rates, the columns are the different terms, and
each cell in the table contains the future value of the initial sum
for the corresponding rate and term.
On to Part 2 when it is available...
Last update: Tuesday, 16-Oct-2012 15:05:51 EDT
Page does not exist.
Missing page.
[an error occurred while processing this directive]
CSC170: Introduction to Programming and the Web
Fall 2012
[an error occurred while processing this directive]
Assignment 6: Functions: Part 1
The script should use these functions to produce a table for values
from 1 to 10 containing the value, the value squared, and the value
cubed. That is, for row i, the columns should
contain i, i2, and i3.
writeTableCell that accepts a
single parameter and outputs a table cell containing the
parameter's value to the page's document.
writeTableRow that accepts 3
parameters and outputs a table row with the 3 values as
separate cells.
futureValue that
computes how much a
given initial sum of money will be worth after a period of time with
compound interest (meaning you reinvest the interest). Your
function should accept the following three parameters:
It should return the future value of the initial amount if invested
for the given number of years at the given interest rate compounded
annually. Think what this means and the way to write the function
will be obvious to you. How much will you have after one year?
Then what happens to that the second year? And so on.
Things to think about
script element or linked script? Experiment.