How to add BMI calculation in quiz?

How to add BMI calculation in quiz?

by Stefano Guglielmetti -
Number of replies: 2

Hi everyone,

I would like to insert a question in which the participant has to enter two numerical answers (weight & height) to obtain a result (the BMI).

The two values must then be translated into BMI through the formula = weight / (height*height).

Is it possible to use one or more question types for this objective?

Thank you!

Average of ratings: -
In reply to Stefano Guglielmetti

Re: How to add BMI calculation in quiz?

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

Hello Stefano,

You can easily do it with the Formulas question type, using grading variables and criterion which are standard features.

You will find attached the XML file of an example that I prepared for you and of which you are the co-contributor if you wish. You can also try the example here ↗.

I fleshed out the feedback a bit, but didn't go further with other formatting considerations as I don't know your specific needs. It is possible to modify the question to enter the weight in cm or in m and cm, to use the decimal comma, to use the two systems of units, metric and US, etc.

ForumQuiz_20210215_2257.png


Average of ratings: Useful (1)