Student answer as a funktion

Student answer as a funktion

by Björn Gerß -
Number of replies: 2

Hi everyone,

I'm a high school teacher, working with stack in my school.

I was able to create some questions by now. One check that must be possible I didn't manage.

Maybe someone could help me with that.

The students has a Function as ans1. Then I like to check for example if ans1(0)=0 or if diff(ans1,x) is 3 if x=0.

How can I do that?

Thanks for your help.

Björn


Average of ratings: -
In reply to Björn Gerß

Re: Student answer as a funktion

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

To do this, I would have part of the question as 

\( f(x) = \) [[input:ans1] ] ...

That way the student won't type in f(x)=x^2, they will just type in the x^2 bit.

So, you have an expression ans1.  Use the following in the SAns field of two potential response nodes

subst(x=0,ans1);
subst(x=0,diff(ans1,x));

Does that help?

In reply to Christopher Sangwin

Re: Student answer as a funktion

by Björn Gerß -
Yes subst was what I was looking for.
Thanks for you help