7. Exercise Set 2
Exercise 2.1: Three Circles
Given: an array of three real values, r, for the radii of three circles;
Compose: a let-in statement that returns two arrays containing the areas and circumferences of the circles of the given radii.
Click here for a sample answer.
Exercise 2.2: More Statistics
Given: four three-element arrays, a, b, c, and d, all containing real numbers;
the formulas for the mean and standard deviation
mean = (a+b+c+d)/4;
standard deviation = (((a-mean)**2 + (b-mean)**2 +
(c-mean)**2 + (d-mean)**2) / 3)**0.5
Compose: a let-in statement that returns an array of records, each containing the mean and standard deviation of one of the given sets of numbers.
Click here for a sample answer.
If you have any questions about this page, or want more information about the
Sisal Language Project, contact:
John Feo at (510) 422-6389 or feo@diego.llnl.gov, or
Tom DeBoni at (510) 423-3793 or deboni@llnl.gov.
The Sisal Language Project has been approved as a Designated Unclassified Subject Area (DUSA) K19222, as of 07 August, 1991.
LLNL Disclaimer
UCRL-MI-122601