0

I would like to set up a NUMERICAL question (embedded cloze) where the answer depends on one or more random variables and the answer must allow for some tolerance.

I tried:

What is #var1 divided by PI? {1:NUMERICAL:=#ans:0.1}

var1 will be generated with the WIRIS random number generator, e.g.

var1=random(10,100)

then:

ans=var1/Pi_

However, the syntax in {1:NUMERICAL:#ans:0.1} throughs an error:

#ans:0.1 The answer must be a number, for example -1.234 or 3e8, or '*'.

The SHORTANSWER question type allows for #ans, but a tolerance cannot be added.

Is it possible to ask this kind of question in moodle? If not, is there an alternative I can use other than the Calculated question type? (I do not want to use the calculated question type since my question has multiple sub-questions that depends on the same random variables.

Kristiaan
  • 21
  • 3

1 Answers1

0

Dear @kristiaan have a look at the Formulas question type which allows for what your are aiming at.

Reference: Formulas question type.

Luca
  • 21
  • 5