https://webwork.maa.org/mediawiki_new/index.php?title=LinkingProblems&feed=atom&action=historyLinkingProblems - Revision history2024-03-28T09:51:45ZRevision history for this page on the wikiMediaWiki 1.34.0https://webwork.maa.org/mediawiki_new/index.php?title=LinkingProblems&diff=23721&oldid=prevPstaabp at 12:45, 16 July 20232023-07-16T12:45:36Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 12:45, 16 July 2023</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{historical}}</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><p style="font-size: 120%;font-weight:bold">The technique in this problem is no longer supported.</p></div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><h2>Linking Successive Problems</h2></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><h2>Linking Successive Problems</h2></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
</table>Pstaabphttps://webwork.maa.org/mediawiki_new/index.php?title=LinkingProblems&diff=12372&oldid=prevGlarose: Created page with '<h2>Linking Successive Problems</h2> <p style="background-color:#eeeeee;border:black solid 1px;padding:3px;"> <em>This is the PG code to result in a problem having a predictable…'2011-11-11T21:55:25Z<p>Created page with '<h2>Linking Successive Problems</h2> <p style="background-color:#eeeeee;border:black solid 1px;padding:3px;"> <em>This is the PG code to result in a problem having a predictable…'</p>
<p><b>New page</b></p><div><h2>Linking Successive Problems</h2><br />
<br />
<p style="background-color:#eeeeee;border:black solid 1px;padding:3px;"><br />
<em>This is the PG code to result in a problem having a predictable set of variable values, so that one can link successive problems in a set "knowing" what the previous problem included.</em><br />
<br /><br />
</p><br />
<br />
<p style="text-align:center;"><br />
[[IndexOfProblemTechniques|Problem Techniques Index]]<br />
</p><br />
<br />
<table cellspacing="0" cellpadding="2" border="0"><br />
<tr valign="top"><br />
<th> PG problem file </th><br />
<th> Explanation </th><br />
</tr><br />
<br />
<tr valign="top"><br />
<td style="background-color:#ffffdd;border:black 1px dashed;"><br />
<pre><br />
SRAND($psvn);<br />
$a = random(1,3,1);<br />
$b = random(1,3,1);<br />
</pre><br />
</td><br />
<td style="background-color:#ffffcc;padding:7px;"><br />
<p><br />
<b>Setup:</b><br />
To make the random values that show up in a problem be consistent between problems, two things need to happen: we need to set the random seed for the problems so that they are the same, and we need the sequence of calls to the random number generator to be the same in each of the problems.<br />
</p><br />
<p><br />
We can do the first of these by calling <code>SRAND</code>; a value that is consistent for all problems in a set is the value of the <code>psvn</code> (Problem Set Version Number). Here we've set the seed for the random number generator to be the PSVN.<br />
</p><br />
<p><br />
Then we just include all of the random calls that have been used in the preceding problems that have the same seed in the same order. Here we have the variables <code>$a</code> and <code>$b</code>. <br />
</p><br />
</td><br />
</tr><br />
<br />
<tr valign="top"><br />
<td style="background-color:#ffdddd;border:black 1px dashed;"><br />
<pre><br />
BEGIN_TEXT<br />
In the previous problem you found<br />
the value of \($a^2\). Now find<br />
$BR<br />
\( $a^2 - $b = \) \{ ans_rule(5) \}<br />
<br />
END_TEXT<br />
</pre><br />
<td style="background-color:#ffcccc;padding:7px;"><br />
<p><br />
<b>Main Text:</b><br />
In the text section of the problem we proceed as expected. <br />
</p><br />
</td><br />
</tr><br />
<br />
<tr valign="top"><br />
<td style="background-color:#eeddff;border:black 1px dashed;"><br />
<pre><br />
ANS( Compute("$a*$a - $b")->cmp() ); <br />
<br />
ENDDOCUMENT();<br />
</pre><br />
<td style="background-color:#eeccff;padding:7px;"><br />
<p><br />
<b>Answer evaluation:</b><br />
And the answer and solution section of the file is straightforward.<br />
</p><br />
</td><br />
</tr><br />
</table><br />
<br />
<p style="text-align:center;"><br />
[[IndexOfProblemTechniques|Problem Techniques Index]]<br />
</p><br />
<br />
[[Category:Problem Techniques]]</div>Glarose