[LON-CAPA-users] Hints for first LON-CAPA question
Peter Dencker
dencker at math.uni-luebeck.de
Fri Jun 14 08:40:25 EDT 2013
Hi,
a clearer code suggestion. (was to tired last night ^^)
<script type="loncapa/perl">
$n = &random(8,16,1);
($mu_a, $sd_a) = (&random(4,16,.01), &random(1,5,.01));
($mu_b, $sd_b) = (&random(4,16,.01), &random(1,5,.01));
@a=map { &roundto($_, 2) } (&random_normal($n,55,$mu_a,$sd_a));
@b=map { &roundto($_, 2) } (&random_normal($n,55,$mu_b,$sd_b));
$table = '<table border=1><tr>'
. join('</tr><tr>', '<td>'. join('</td><td>', '', 1 .. $n) . '</td>',
'<td>' . join('</td><td>', 'A', @a) . '</td>',
'<td>' . join('</td><td>', 'B', @b) . '</td>')
. '</tr></table>';
</script>
- Peter
On 06/13/2013 09:04 PM, Joseph Mingrone wrote:
> Joseph Mingrone <jrm at mathstat.dal.ca> writes:
>
> Hello all;
>
> I'm creating a problem that I've included below. My questions are:
>
> 1. How can a student submit each part of the question separately?
>
> 2. In the table, I'm building the header with $row1 .= "<td>$i+1</td>",
> but the $i+1 isn't evaluated and 0+1, 1+1, etc. is shown. How can I get
> the intended output?
>
> 3. How can \bar{x} be displayed?
>
> 4. In the last radiobuttonresponse question, only one foil is showing up
> even though I've specified max=3. How can I make all three show up?
>
> 5. This is my first attempt at a question and I have no sample code
> other than what's in the manual. If you have any other suggestions
> about style or best practices, please pass them along.
>
> Thanks,
>
> Joseph
>
--
Dr. Peter Dencker
wissenschaftl. Mitarbeiter
UNIVERSITÄT ZU LÜBECK
INSTITUT FÜR MATHEMATIK
Ratzeburger Allee 160
23562 Lübeck
Tel +49 451 500 4254
Fax +49 451 500 3373
dencker at math.uni-luebeck.de
www.math.uni-luebeck.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20130614/3d63f618/attachment.bin>
More information about the LON-CAPA-users
mailing list