@@ -23,7 +23,6 @@ loadMacros(
2323 "PGstandard.pl",
2424 "PGchoicemacros.pl",
2525 "MathObjects.pl",
26- "contextInequalitiesAllowStrings.pl",
2726 "PGcourse.pl"
2827);
2928
@@ -33,6 +32,8 @@ TEXT(beginproblem());
3332# Setup
3433#This is an (-infinity,a) or (b,infinity) problem:
3534
35+ Context("Interval");
36+
3637$a = random(-5,4,1);
3738do {$b = random(1,9,1);} while ($a==$b);
3839
@@ -42,19 +43,25 @@ do {$b = random(1,9,1);} while ($a==$b);
4243######################################
4344# Main text
4445
46+ Context()->texStrings;
4547BEGIN_TEXT
46- Solve the compound inequality.
48+ Solve the compound inequality. Write your answer in \{helpLink("interval","interval notation")\}.
4749\[ $inequal[$slice[0]] \mbox{ or } $inequal[$slice[1]] \]
48- Answer: \{ ans_rule(20) \}
50+ Answer: \(x \in \) \ { ans_rule(20) \}
4951END_TEXT
52+ Context()->normalStrings;
5053
5154######################################
5255# Answer
5356
54- Context("Inequalities-AllowStrings");
57+ # Require interval notation so answers don't just repeat the question.
5558
56- $ans = Compute("$inequal[0] or $inequal[1]");
57- if ($a>$b) {$ans = Compute("All real numbers");}
59+ if ($a<$b){
60+ $ans = Compute("(-infinity,$a) U ($b,infinity)");
61+ }
62+ else {
63+ $ans = Compute("(-infinity,infinity)");
64+ }
5865ANS($ans->cmp);
5966
6067$showPartialCorrectAnswers = 1;
0 commit comments