Log Message:
-----------
Adding prob05 of setOrientation to modelCourse
Added Files:
-----------
webwork2/courses.dist/modelCourse/templates/setOrientation/prob05:
prob05-a.gif
prob05-b.gif
prob05-c.gif
prob05.pg
Revision Data
-------------
--- /dev/null
+++ courses.dist/modelCourse/templates/setOrientation/prob05/prob05.pg
@@ -0,0 +1,131 @@
+DOCUMENT(); # This should be the first executable line in the problem.
+
+loadMacros(
+ "PGstandard.pl",
+ "PGchoicemacros.pl",
+ "MathObjects.pl",
+ "PGunion.pl",
+ "alignedChoice.pl",
+ "../parserOrientation.pl",
+ "PGcourse.pl",
+);
+
+$showPartialCorrectAnswers = 1;
+
+TEXT(beginproblem);
+
+Title("Common Errors to Avoid");
+
+##############################################
+
+BEGIN_TEXT
+
+Many of the answers you enter into $WW will be expressions
+that involve variables. Here are some important things to know.
+
+$PAR
+
+\{BeginParList("UL")\}
+
+$ITEM
+It matters what letter you use. For example, if you are asked for a
+function using the variable \(x\), then it won't work to enter the
+function with the variable \(t\). Also, $WW considers upper- and
+lower-case letters to be different, so don't use the capital letter
+\{student "X"\} in place of the lower-case letter \{student "x"\}.
+The following blank is expecting the
+function \(x^3\), which you would enter as \{student "x${CARET}3"\} or
+\{student "x**3"\}. Instead, try entering \{student "t${CARET}3"\} and
+submitting your answer.
+
+$PAR
+$BBLOCKQUOTE
+\{ans_rule(10)\}
+$EBLOCKQUOTE
+$PAR
+
+You should get an error message informing you that \{computer "t"\}
+is not defined in this context. This tells you that $WW did not receive the
+correct variable and doesn't know how to check your answer. Now enter
+\{student "x${CARET}3"\} and resubmit to get credit for this part of
+the problem.
+
+END_TEXT
+
+ANS(Formula("x^3")->cmp);
+
+##################################################
+
+$IMGA = MathIMG("prob05-a.gif","1/x+1","1/x+1");
+$IMGB = MathIMG("prob05-b.gif","1/(x+1)","\frac{1}{x+1}");
+$IMGC = MathIMG("prob05-c.gif","(1/x)+1","\frac{1}{x} + 1");
+
+BEGIN_TEXT
+
+$ITEM
+$WW requires that you be precise in how you think about and present
+your answer. We have just seen that you need to be careful about the
+variables that you use. You must be equally careful about how the
+rules of precedence apply to your answers. Often, this involves using
+parentheses appropriately.
+
+$PAR
+
+For example, you might write $IMGA on your paper when you meant $IMGB,
+but that is actually incorrect. The expression $IMGA means $IMGC,
+according to the rules of precedence. $WW will force you to be exact
+in what you are thinking and in what you are writing, because it must
+interpret your answers according to the standard rules. If you want
+to enter something that means $IMGB, you must write \{student
+"1/(x+1)"\}. This also is true in written work, so making a habit of
+being precise about this will improve your written mathematics as well
+as your ability to enter answers quickly and correctly in $WW.
+
+$PAR
+END_TEXT
+
+##################################################
+
+BEGIN_TEXT
+
+\{EndParList("UL")\}
+
+$PAR
+$HR
+$PAR
+
+Now enter the following functions:
+$PAR
+END_TEXT
+
+$al = new_aligned_list(
+ equals => 1, ans_rule_len => 30,
+ tex_spacing => "5pt", spacing => 10
+);
+
+Context("Numeric")->variables->are(t=>'Real'); $t = Formula("t");
+Context("Numeric")->variables->are(y=>'Real'); $y = Formula("y");
+Context("Numeric")->variables->are(x=>'Real'); $x = Formula("x");
+
+$al->qa(
+ DisplayQA($t/(2*$t+6)),
+# DisplayQA(2*$y*($y**2-$y+1)),
+# DisplayQA(1/$x**2 - 3*(1/$x)),
+ DisplayQA(1/(2*($x-5))),
+ DisplayQA((2*$x-3)**4),
+);
+
+BEGIN_TEXT
+
+$BBLOCKQUOTE
+\{$al->print_q\}
+$EBLOCKQUOTE
+
+END_TEXT
+
+ANS($al->correct_ans);
+
+
+##############################################
+
+ENDDOCUMENT(); # This should be the last executable line in the problem.
|