Using exponent function in the calculated Questions

Using exponent function in the calculated Questions

by Saul Pv -
Number of replies: 2

I'm trying to write a calculated question with multichoice options:


Calculate the following product $$(x+{={a}})(x+{={b}})$$


The problem is when writing the options, I just cant write the power, tried

 $$pow(x,2)+{={a}+{b}}x+{={a}*{b}}$$

 $$x^2+{={a}+{b}}x+{={a}*{b}}$$

 $$x**2+{={a}+{b}}x+{={a}*{b}}$$

 $$pow({x},2)+{={a}+{b}}x+{={a}*{b}}$$


All four return the same, for example the first one returns  $$pow(x,2)+{={a}+{b}}x+{={a}*{b}}$$.

The values of a and b works fine

Attachment Captura de pantalla de 2019-05-08 20-20-47.png
Average of ratings: -
In reply to Saul Pv

Re: Using exponent function in the calculated Questions

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Please ignore my previous post. I think you can not put TeX equations in the choices of a Calculated multichoice question.

You can do it with the Formulas question type:

ForumQuiz-20190510-2305.png

where the constants 3 and 5 were obtained randomly and the values 8 and 15 calculated accordingly.

See Multiple choice with TeX equations ↗ on MoodleFormulas.org.