// Numbas version: exam_results_page_options {"name": "Benjamin's copy of Conditional visibility", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "statement": "

First, this question picks between three scenarios.

\n
\n

This is Scenario 1.

\n
\n
\n

This is Scenario 2.

\n
\n
\n

This is Scenario 3.

\n
\n

Now, consider the quadratic equation

\n

\\[ \\simplify{{a}x^2+{b}x+{c} = 0} \\]

\n

The discriminant of this equation is $\\simplify[!basic]{{b}^2-4*{a}*{c}} = \\var{b^2-4*a*c}$. This is greater than zero, so the equation has two real roots. As this is zero, the equation has one repeated root. This is less than zero, so the equation has no real roots.

", "parts": [], "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Show one of several blocks of text depending on the value of a question variable.

\n

As well as a simple check for the value of a variable, the condition to display a block of text can be a complex expression in any of the question variables - in this example, depending on the discriminant of the generated quadratic.

"}, "functions": {}, "variables": {"c": {"templateType": "anything", "name": "c", "group": "Quadratic equation", "definition": "random(-4..4 except 0)", "description": ""}, "a": {"templateType": "anything", "name": "a", "group": "Quadratic equation", "definition": "random(1..3)", "description": ""}, "scenario": {"templateType": "anything", "name": "scenario", "group": "Scenario", "definition": "random(1,2,3)", "description": "

Choose between three scenarios.

"}, "b": {"templateType": "anything", "name": "b", "group": "Quadratic equation", "definition": "random(-6..6 except 0)", "description": ""}}, "showQuestionGroupNames": false, "type": "question", "ungrouped_variables": [], "variable_groups": [{"name": "Scenario", "variables": ["scenario"]}, {"name": "Quadratic equation", "variables": ["a", "b", "c"]}], "tags": ["conditional visibility", "demo"], "name": "Benjamin's copy of Conditional visibility", "advice": "", "rulesets": {}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Benjamin Bui", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3123/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Benjamin Bui", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3123/"}]}