[LON-CAPA-users] Implicit Answer Response

GARRETT, DONNELL MAZON lon-capa-users@mail.lon-capa.org
Wed, 19 Oct 2005 18:13:26 -0400

Hey, I MUST have an error some where, but I can't see it

In my script, I have this:

$A = -$temp;
$w = $vPart2;

$iCurrent = $A*cos($w*t);

And, in a part of my .problem, I have this:

<formularesponse answer="$iCurrent" samples="t@1:5#4">
    <responseparam description="Numerical Tolerance" type="tolerance"
default="0.00001" name="tol" />
    <textline size="25"/>
    <startouttext /><endouttext />

Yet, when I try to enter an answer, it just says that it is " Unable to
understand formula"

Why not?!


-----Original Message-----
From: lon-capa-users-admin@mail.lon-capa.org
[mailto:lon-capa-users-admin@mail.lon-capa.org] On Behalf Of Gerd
Sent: Wednesday, October 19, 2005 4:59 PM
To: lon-capa-users@mail.lon-capa.org
Subject: Re: [LON-CAPA-users] Implicit Answer Response

Hi Donnell,

On Oct 19, 2005, at 3:02 PM, GARRETT, DONNELL MAZON wrote:
> If I wanted students to enter in an answer along the lines of:
> -4cos 500t A
> Where A is unit Amps

That is sort of a mix between formula response and numerical response.

 From the physics, in this case, 500 needs a unit, for example Hz,  
along the lines of

  (-4A)cos(500 Hz*t)

I would suggest just using variables all the way, along the lines of

  w (for omega) = 500 Hz

LON-CAPA can deal with


as an answer when you use formula response, and realize that that is  
for example the same as


- Gerd.

LON-CAPA-users mailing list