How can I save intermediate calculations for reuse in my formula

How can I save intermediate calculations for reuse in my formula

by Oleg Melnikov -
Number of replies: 1

Hi all. I'm new to Moodle LMS, but have used Canvas LMS for several years. There I could save intermediate formula results for reuse in the same quiz's formula. 

Here is toy example:

The variance of a Binomial(\(n,p\)) distribution is \(np(1-p)\). Given some observations, I can estimate the probability \(p\) and then use it twice in a formula to compute the variance \(np(1-p)\). In Canvas, I could save the probability to \(p\) variable. Is it possible in Moodle with 

  1. Calculated Questions (which are in base Moodle installation) ? 
  2. Formulas Questions (which is a external plug-in for Moodle) ? 

Average of ratings: -
In reply to Oleg Melnikov

Re: How can I save intermediate calculations for reuse in my formula

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Formulas is multi-parts. You can use variables globally with all parts and locally with each part.
Average of ratings: Useful (1)