[LON-CAPA-users] Having an equation or a range as a response
Seema Ali
sali at vsb.bc.ca
Fri Jan 20 01:03:39 EST 2012
Thank you Gerd!
That worked well. I changed one of the lines to
if (&cas('maxima',"($left)-($b)-(y-$right)") eq '0') { return 'EXACT_ANS'; }
Just in case someone decides to enter 8=y. =]
-----Original Message-----
From: lon-capa-users-bounces at mail.lon-capa.org on behalf of Gerd Kortemeyer
Sent: Thu 1/19/2012 8:17 PM
To: Discussion list for LON-CAPA users
Subject: Re: [LON-CAPA-users] Having an equation or a range as a response
Hi,
On Jan 19, 2012, at 9:51 PM, Gerd Kortemeyer wrote:
>
>
> On Jan 19, 2012, at 8:39 PM, Seema Ali wrote:
>
>> An example would be:
>>
>> State the equation for the asymptote for the graph y=10^(x+7)+8.
>> Answer: [answer box]
>>
>
> So that would be x=7 or y=8, correct?
Not sure anymore how I got to that x-solution, except that I just looked at the Google plot :-) In any case, I hope the sample code is useful, just eliminate the second solution.
For more complex equations, you need to wrap the MAXIMA-code into trigsimp(trigreduce(.)), so MAXIMA bothers simplifying the expression beyond the basics. When I have more time, I'll make a nice template for an "equation problem."
What else?
- Gerd.
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users at mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20120119/4bc6aca9/attachment.html>
More information about the LON-CAPA-users
mailing list