Editing Invaders Sample Problem

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 31: Line 31:
 
| <pre>
 
| <pre>
 
##DESCRIPTION
 
##DESCRIPTION
## derivatives practice
 
  +
## Graphical limits
 
##ENDDESCRIPTION
 
##ENDDESCRIPTION
   
##KEYWORDS('derivatives', 'Flash applets','NSF-0941388')
 
  +
##KEYWORDS('limits')
   
 
## DBsubject('Calculus')
 
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
+
## DBchapter('Limits')
## DBsection('Derivatives')
+
## DBsection('Graphical limits')
## Date('1/12/2012')
+
## Date('7/5/2011')
 
## Author('Barbara Margolius')
 
## Author('Barbara Margolius')
 
## Institution('Cleveland State University')
 
## Institution('Cleveland State University')
 
## TitleText1('')
 
## TitleText1('')
## EditionText1('2012')
+
## EditionText1('2011')
 
## AuthorText1('')
 
## AuthorText1('')
 
## Section1('')
 
## Section1('')
Line 69: Line 69:
   
 
loadMacros(
 
loadMacros(
"PGanswermacros.pl",
+
"PGanswermacros.pl",
 
"PGstandard.pl",
 
"PGstandard.pl",
 
"AppletObjects.pl",
 
"AppletObjects.pl",
 
"MathObjects.pl",
 
"MathObjects.pl",
 
);
 
);
 
 
</pre>
 
</pre>
 
| <p>
 
| <p>
Line 89: Line 88:
 
Context("Numeric");
 
Context("Numeric");
   
$high = 0;
 
  +
$qtype='first_derivative';
$baseSpeed = 0.25;
 
   
$ans =Compute("1");
 
  +
$showHint = 0;
  +
if(time>$dueDate){
  +
$showHint=1;
  +
}
  +
  +
$x1=random(-8,-2,1);
  +
$x2=$x1+random(2,4,1);
  +
$x3=$x2+random(2,3,1);
  +
$x4=random($x3+2,7,1);
 
</pre>
 
</pre>
 
| <p>
 
| <p>
Line 98: Line 104:
 
</p>
 
</p>
 
<p>
 
<p>
The invaders.swf applet will accepts a <code>$basespeed</code> setting that determines the initial speed of the descending tiles. The default is 0.5. The setting here of 0.25 is a fairly slow initial speed. As the student matches function/derivative pairs, the tiles descend more quickly.
 
  +
The GraphLimits.swf applet will accept four different question types, specified with the <code>$qtype</code> variable. These are: limits, continuity, first_derivative and second_derivative. This sample problem is set to 'first_derivative'.
  +
</p>
  +
<p>
  +
The applet has solution/hint information embedded in it. When <code>$hintState=0</code>, this information is not shown. When <code>$hintState=1</code>, this information is revealed. The <code>time</code> parameter tracks the current date and time. The conditional compares that to the due date for the problem set (in the <code>$dueDate</code> scalar variable) and sets <code>$hintState</code> to 1 if the due date has passed and leaves <code>$hintState</code> set to 0 if the assignment is not yet due.
  +
</p>
  +
<p>
  +
The four variables <code>$x1</code>, <code>$x2</code>, <code>$x3</code> and <code>$x4</code> are the x-coordinates of four points on the graph that the applet will set to be a removable discontinuity, a jump discontinuity or a cusp. The order of these phenomena is random as are the y-values chosen. The x-coordinates must be between -10 and 10.
 
</p>
 
</p>
 
|- style=" background-color:#ccffff;"
 
|- style=" background-color:#ccffff;"

Please note that all contributions to WeBWorK_wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see The WeBWorK Project wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)