Stack answer test option

Stack answer test option

by Jong-Dae Park -
Number of replies: 3

Hello, 


Happy new year!

I have a question about stack answer test option for facform.

I want to ask  student to factorize a natural number, for example 45. 

The answer should be 3^2*5

How should I specify the answer test option for facform?

Thanks.

JD Park



Average of ratings: -
In reply to Jong-Dae Park

Re: Stack answer test option

by Stephan Bach -

Hi,

you can just define the correct answer as

ta:factor(45);
and use EqualComAss as the answer test.

Stephan.

In reply to Stephan Bach

Re: Stack answer test option

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Thanks Stephan,

That is exactly what I would do.  However, note that EqualComAss does not think that `2^2*3` and `2*2*3` are the same!  So you will have to decide what you mean by "factored" here, and possibly have more than one node in your PRT to check for both options.

I think it is reasonable to expect one of `2^2*3^2` or `2*2*3*3`, and not to accept `2*2*3^2`.  But that is a matter of taste. 

We don't have a special way of gathering powers together, but not doing multiplication otherwise.  

Chris