Problem1
ERROR caught by Translator while processing problem file:Library/Rochester/setAlgebra01RealNumbers/lhp1_31-34_mo.pg
****************
Error detected while loading [TMPL]/macros/PGcourse.pl:
PG_macro_file_eval detected error at line 246 of file [PG]/lib/PGloadfiles.pm
Error detected while loading [PG]/macros/problemRandomize.pl:
PG_macro_file_eval detected error at line 246 of file [PG]/lib/PGloadfiles.pm
syntax error at line 190 of (eval 4405), near "; #$main::PG_FLAGS{PROBLEM_GRADER_TO_USE} || \&main::avg_problem_grader,
random"
syntax error at (eval 4405) line 199, near ";
}"
syntax error at (eval 4405) line 214, near ";
}"
"my" variable $main::PG can't be in a package at (eval 4405) line 221, near ";
$main::PG"
syntax error at (eval 4405) line 226, near ";
}"
syntax error at (eval 4405) line 239, near ";
}"
syntax error at (eval 4405) line 255, near ";
}"
syntax error at (eval 4405) line 266, near ";
}"
syntax error at (eval 4405) line 278, near ";
}"
syntax error at (eval 4405) line 283, near "shift}"
(eval 4405) has too many errors.
The calling package is PGloadfiles
The calling package is PGloadfiles
Died within PGloadfiles::compile_file called at line 334 of [PG]/lib/PGloadfiles.pm
from within PGloadfiles::loadMacros called at line 408 of [PG]/macros/PG.pl
from within main::loadMacros called at line 28 of (eval 4246)
****************
------Input Read
1 ## DESCRIPTION
2 ## lhp1_31-34_mo.pg.
3 ## Basic Algebra
4 ## ENDDESCRIPTION
5
6 ## KEYWORDS ('interval notation')
7 ## Tagged by cmd6a 4/4/06
8 ## Modified by darnold on 06-09-2008
9
10 ## DBsubject('Algebra')
11 ## DBchapter('Basic Algebra')
12 ## DBsection('Real Numbers')
13 ## Date('')
14 ## Modified('6/9/2008')
15 ## Author('')
16 ## Institution('Rochester')
17 ## TitleText1('')
18 ## EditionText1('')
19 ## AuthorText1('')
20 ## Section1('')
21 ## Problem1('')
22 ##ENDDESCRIPTION
23
24 ##KEYWORDS('algebra, interval notation')
25
26 DOCUMENT();
27
28 loadMacros(
29 "PGstandard.pl",
30 "extraAnswerEvaluators.pl",
31 "MathObjects.pl",
32 "contextInequalities.pl",
33 "PGcourse.pl" # Contains customization settings for the course, this should always be last
34 );
35
36 TEXT(beginproblem());
37 $showPartialCorrectAnswers=1;
38
39 ###################
40 #
41 # Setup
42
43 Context("Inequalities"); # So the question will display correctly as an inequality
44
45 $a=random(2,30);
46 $b=random(1,30);
47 $c=random(1,30);
48 $d=random(1,30);
49 $a1 = $a-3;
50 $b1 = $b-5;
51 $c1 = $c-4;
52 $d1 = $d-5;
53
54 ## We put how we want the answer to look in Compute()
55 push( @interval, Compute("[$a1,$a]") );
56 push( @interval, Compute("($b1,$b]") );
57 push( @interval, Compute("($c1,$c)") );
58 push( @interval, Compute("[$d1,$d)") );
59
60 ###################
61 #
62 # Text
63
64 Context()->texStrings;
65
66 ## But we cast $interval[i] to an Inequality for the question, here:
67 BEGIN_TEXT
68 Sketch the following sets on a piece of paper and write them in interval notation. Enter the interval in the answer box. You may use "infinity" for \(\infty\) and "-infinity" for \(-\infty\). For example, you may write (-infinity, 5] for the interval \((-\infty,5]\).$BR
69 \( \{ Inequality( $interval[0] ) \} \)$SPACE$SPACE\{ ans_rule(20)\}
70 $PAR
71 \( \{ Inequality( $interval[1] ) \} \)$SPACE$SPACE\{ ans_rule(20)\}
72 $PAR
73 \( \{ Inequality( $interval[2] ) \} \)$SPACE$SPACE\{ ans_rule(20)\}
74 $PAR
75 \( \{ Inequality( $interval[3] ) \} \)$SPACE$SPACE\{ ans_rule(20)\}
76 $PAR
77 END_TEXT
78
79 Context()->normalStrings;
80
81 ###################
82 #
83 # Answers
84
85 Context("Interval"); # Because we only want to accept answers in interval form
86
87 ANS($interval[0]->cmp );
88 ANS($interval[1]->cmp );
89 ANS($interval[2]->cmp );
90 ANS($interval[3]->cmp );
91
92
93 COMMENT('MathObject version');
94
95 COMMENT('MathObject version');
96 ENDDOCUMENT();
-----