[npl] / trunk / NationalProblemLibrary / Rochester / setAlgebra28ExpFunctions / Test1_20.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setAlgebra28ExpFunctions/Test1_20.pg

Tue Apr 11 16:55:13 2006 UTC (7 years, 2 months ago) by jjholt
File size: 1710 byte(s)
```Added tags.  --JH
```

```    1 ## DESCRIPTION
2 ## Algebra: Exponential and Logarithmic Functions
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS ('compound interest')
6 ## Tagged by cmd6a 4/4/06
7
8 ## DBsubject('Algebra')
9 ## DBchapter('Exponential and Logarithmic Functions')
10 ## DBsection('Applications of Exponential and Logarithmic Functions')
11 ## Date('2001/2002')
12 ## Author('Mark Schmitt')
13 ## Institution('Rochester')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGauxiliaryFunctions.pl"
28 );
29
30 TEXT(beginproblem());
31 \$showPartialCorrectAnswers = 1;
32
33 \$A = random(1000,10000,1000);
34 \$B = random(2,7,.25);
35 \$C = random(2004,2008,1);
36
37 \$F = \$A;
38 \$x = 0;
39 while (\$F<15000) {\$F=\$F*(1+\$B/1200); \$x=\$x+1;}
40
41 \$y=0;
42 \$m=\$x;
43 while (\$m>11) {\$m=\$m-12; \$y=\$y+1;}
44
45 @month = ("December","January", "February", "March", "April", "May",
46 "June", "July", "August", "September", "October", "November");
47
48 TEXT(EV2(<<EOT));
49 You invest \$DOLLAR \$A in Acme Inc. on January 1, 2000.  Your investment returns
50 \$B \$PERCENT compounded monthly.  How much money will you have on June 30, \$C?
51 \$BR\$BR
52 You will have \$DOLLAR \{ans_rule(10)\}
53 \$BR
54 \$BR
55 After what month and year will you have at least \$DOLLAR 15,000?
56 \$BR\$BR
57 You will have at least \$DOLLAR 15,000 after \{ans_rule(10)\} (month)
58 \{ans_rule(6)\} (year).  Please capitalize the month and do not use any
59 abbreviation.
60 EOT
61
62 \$ans = \$A * (1 + \$B/1200)** ((\$C -2000)*12 +6);
63 ANS(num_cmp(\$ans,format =>'%0.2f'));
64 ANS(str_cmp(\$month[\$m]));
65 ANS(num_cmp(2000+\$y));
66 ENDDOCUMENT();        # This should be the last executable line in the problem.
67
```

 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9