(Answer) (Category) LON-CAPA User Help : (Category) Authoring : (Category) Authoring Problems :
My students see 1.33333333333 as their answer, can I format this?
Yes.  In the parameter for the numerical response, you can use the following:

2e  (answer will display as 1.33e01)
2f  (answer will display as 1.33)
$format (you can use a variable where $format evaluates to something like "2e".

For those who use XML to code thier problems:

<numericalresponse answer="$answer"> (shows all digits)
<numericalresponse answer="$answer" format="2e"> (for example prints 1.23e-04)
<numericalresponse answer="$answer" format="$format"> 
<numericalresponse answer="@answer"> (shows all digits of all answers)
<numericalresponse answer="@answer" format="2e"> (shows all answers in 2e)
<numericalresponse answer="@answer" foramt="$format"> 
<numericalresponse answer="@answer" foramt="@format">
If you want your answers to a numerical problem to display only digits
after the decimal when answers are shown, then enter "2f" in the format
box next to the numerical answer box.

2f - 3.333333 will be displayed 3.33
0f - 3.333333 will be displayed 3
2E - 333.3333 will be displayed 3.33 E2
[Append to This Answer]
Previous: (Answer) What's a foil?
Next: (Answer) How can I add a picture to my problem?
This document is: http://help.loncapa.org/cgi-bin/fom?file=76
[Search] [Appearance] [Show This Answer As Text]
This is a Faq-O-Matic 2.719.
This FAQ administered by the LON-CAPA team at MSU. Submit a help request ticket to contact us.