Vlook up Function for Formulas Question

Re: Vlook up Function for Formulas Question

by Dominique Bauer -
Number of replies: 3
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Carisa,

Define a random variable:
    i = {0:3};

Define the global variables:
    specie = ["Cedar","Douglas Fir-Larch","Spruce-Pine-Fir"];
    unit_weight = [3400,4800,4100];

In the calculations, use:
    unit_weight[i]

In the question text, use:
    {=specie[i]}

Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Vlook up Function for Formulas Question

by Carisa Blancas -

Hello Dominique,

Thanks a lot for the help. Finally, I was able to make my formula question work without creating different questions for every specie. I'm happy to share what I came up with but I cannot upload the file. It is greater than 2MB. 

I would appreciate any advice.

Carisa

In reply to Carisa Blancas

Re: Vlook up Function for Formulas Question

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

Hello Carisa,

The community would certainly appreciate you sharing your solution.

The size of the question is large probably because it contains images. In order to reduce the size, you could remove the images. If they are required for the understanding of the question, you can make their size smaller by lowering their resolution: first reduce the size of the images in an image editor, then replace the images in the question with these reduced images while keeping the original dimensions.

The images will be of lower quality but the question will be lighter so you can upload it.

Average of ratings: Useful (1)
In reply to Dominique Bauer

Sample Formula Question for Dead Load (Self-weight) Calculations with random Specie of Timber

by Carisa Blancas -

Hi Dominique,

Thanks again for the help. It worked now with the smaller diagram. I'm not sure what subject to categorize it. Please feel free to change. This question also assigns partial marks to students if they miscalculated a value that is needed for subsequent calculations.

All the best,

Carisa