WeBWorK Main Forum

Displaying answers with two decimals, but keeping student answers as is

Re: Displaying answers with two decimals, but keeping student answers as is

by Rick Lynch -
Number of replies: 0
Thanks, Alex!! Yes, I've used the Currency context before, but I wasn't aware there was a way to remove the need to enter a dollar sign, so this will certainly work for problems where monetary values are the answers. It also has the benefit that the correct answers now show up with the dollar sign. Great!

Now the issue is that I also want to do this for other problems that involve non-monetary numbers rounded to 4 decimal places. For example, the answer might be 6.5, in which case I want the answer displayed in the "Correct Answer" column to be 6.5000, and for students to enter any number of decimals and not have it automatically rounded in the "Answer" column, so 6.5111235 wouldn't show as 6.5111 and as inputted.

To be fair, none of this is really a huge deal, but I'm just patching up the edges so to speak from my instructors' requests. Again, thanks for your input!