PREP 2015 Question Authoring - Archived

random variable list reads "1" as a default value?

Re: random variable list reads "1" as a default value?

by Davide Cervone -
Number of replies: 0
Paul has beaten me to it again, and has correctly identified the problem. But I also wanted to give you some formatting advice, so am responding as well.

First, you have broken your opening paragraph into several shorter paragraphs (each line is a separate paragraph because of the blank lines in between). This might format OK on your screen, but for the (growing number of) people using handheld devices for doing their WeBWorK assignments, you are likely to get some very bad line breaks. It is best to let the browser do the line breaking rather than force paragraph breaks within the middle of a sentence.

Second, you have hand numbered your lists; the formatting could be improved if you used PGML lists rather than these "fake" lists. To do that, use 1. rather than 1.), and 2. rather than 2.), and so on.

In order to make the "k = [____]" and "A = [____]" be part of the list item in which they appear, you will need to indent them using four spaces (otherwise, they start a new paragraph, and that means the second list item will start a new list numbered starting at 1).

I recommend that you always use a math mode (TeX or algebra, it doesn't matter) whenever you refer to a variable of function name. So "find the values of A and k" should be "find the values of [`A`] and [`k`]". This will make sure the variable names are properly typeset, and appear the same in your sentences as they do in your formulas.

Finally, you don't need to use Compute() in the answers within PGML. It is allowed, but it is unnecessary, and makes things harder to read.

With these things in mind, I'd recommend your main text be formatted as follows:

TEXT(beginproblem());
BEGIN_PGML

The concentration of a particular drug within the bloodstream can be determined 
by the function: [``C(t) = Ate^{-kt}``], where [`t`] is the number of hours since the drug 
was ingested orally and [`C(t)`] is the concentration of the drug in micrograms per ml 
of blood. Given that [`A`] and [`k`] are both positive constants.

1.  Given that the maximum concentration of [$d] occurs [$m] 
minutes after 
ingesting the drug, find the values of [`A`] and [`k`].
    
    [`k`] = [_____]{"60/[$m]"}  
    [`A`] = [_____]{"60*[$d]*e/[$m]"}

2.  What is concentration of the drug in the bloodstream [$t1] hours after
its ingestion?

    [`C([$t1])`] = [________]{"(60*[$d]*[$t1]*e**{1-60*[$t1]/[$m]})/[$m]"}

END_PGML
You can do similar things within the solution section (I will leave that to you).

One improvement that I might suggest in the solution is to use the TeX aligned environment to handle some go your multi-line expressions. For example

[``C([$t1]) = [$a]([$t1])e^{1-[$k1]([$t1])}``]

[``C([$t1]) = [$at]e^{1-[$kt]}``]

[``C([$t1]) = [$at]e^{[$kt1]}``]

[``C([$t1]) = \frac{[$at]}{e^{[$ktn]}}``]

[``C([$t1]) = [$ans2]``]
can be replaced by
[``\begin{aligned}
  C([$t1]) &= [$a]([$t1])e^{1-[$k1]([$t1])} \\
           &= [$at]e^{1-[$kt]} \\
           &= [$at]e^{[$kt1]} \\
           &= \frac{[$at]}{e^{[$ktn]}} \\
           &= [$ans2]
\end{aligned}``]
This is a matter of knowing some more advanced TeX commands, which is really outside the scope of this course, but I thought I'd mention this one, since this is something that can simplify your solutions.