[npl] / trunk / NationalProblemLibrary / CollegeOfIdaho / setAlgebra_01_02_OperationsWithRealNumbers / 12IntAlg_04_OperationsWithReals.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/CollegeOfIdaho/setAlgebra_01_02_OperationsWithRealNumbers/12IntAlg_04_OperationsWithReals.pg

Tue Aug 24 14:40:25 2010 UTC (2 years, 9 months ago) by apizer
File size: 1392 byte(s)
`Results of running convert_fun_in_dir.sh to clean up problems`

```    1 ##DESCRIPTION
2 ##  Add signed fractions ****Need to do
3 ##
4 ##ENDDESCRIPTION
5 ## DBsubject('Intermediate Algebra')
6 ## DBchapter('Ch 01: Algebra, Mathematical Models and Problem Solving')
7 ## DBsection('Operations with Real Numbers and Simplifying Algebraic Expressions')
8 ## KEYWORDS('real numbers','operations with signed numbers')
9 ## TitleText1('Essentials of Intermediate Algebra')
10 ## EditionText1('1')
11 ## AuthorText1('Blitzer')
12 ## Section1('1.2')
13 ## Problem1('')
14 ## Author('RA Cruz')
15 ## Institution('The College of Idaho')
16 ## Date: 2007/09
17
18
19 DOCUMENT();        # This should be the first executable line in the problem.
20
22   "PGstandard.pl",
23   "MathObjects.pl",
24   "contextLimitedNumeric.pl"
25 );
26
27 TEXT(beginproblem());
28
29 ######################################
30 #  Setup
31
32 \$a1 = random(-12,-2,1);
33 do {\$a2 = random(-12,-2,1);} while (\$a1==\$a2);
34
35 \$b1 = random(-12,-2,1);
36 \$b2 = random(2,12,1);
37
38 ######################################
39 #  Main text
40
41 BEGIN_TEXT
43 \$PAR
44 a) \( \$a1 + (\$a2) = \)  \{ ans_rule(10) \}
45 \$PAR
46 b) \( \$b1 + \$b2 = \)  \{ ans_rule(10) \}
47 \$BR
48
49 END_TEXT
50
51 ######################################
53
54 Context("LimitedNumeric");
55
56 \$ans_a=Real(\$a1 + (\$a2))->reduce;
57 ANS(\$ans_a->cmp);
58
59 \$ans_b=Real(\$b1 + \$b2)->reduce;
60 ANS(\$ans_b->cmp);
61