[LON-CAPA-users] Imaginary Numbers

Harding, Gene L glhardin at purdue.edu
Thu Feb 18 11:26:58 EST 2016

Hi Damien,
I was using a similar approach, but yours is more elegant, so I have modified mine.  Thanks for the info!
Best regards,

Gene L. Harding, PE
Associate Professor of ECET

-----Original Message-----
From: lon-capa-users-bounces at mail.lon-capa.org [mailto:lon-capa-users-bounces at mail.lon-capa.org] On Behalf Of Damien Guillaume
Sent: Thursday, February 18, 2016 10:39 AM
To: Discussion list for LON-CAPA users <lon-capa-users at mail.lon-capa.org>
Subject: Re: [LON-CAPA-users] Imaginary Numbers

> I am still having trouble with the response portion.  Is there a way to get "numericalresponse" to handle a complex number?  If not, is the technique Justin suggested using Maxima a good route?  Or is it best to just break the response into two "numericalresponses", one for the real part and one for the imaginary part?

If you are just asking for a complex number, and you don't mind giving a hint that there might be an imaginary part, you could also use a single numerical response asking for 2 values (ordered), like that:

   <startouttext/>Enter 1+2i:<endouttext/>
     <answergroup type="ordered">
     <textline size="5" readonly="no"/>
     <textline size="5" readonly="no"/>

LON-CAPA-users mailing list
LON-CAPA-users at mail.lon-capa.org

More information about the LON-CAPA-users mailing list