Student answer as a funktion

Student answer as a funktion

- Björn Gerß の投稿
返信数: 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


Björn Gerß への返信

Re: Student answer as a funktion

- Christopher Sangwin の投稿
画像 Particularly helpful Moodlers 画像 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?