// Numbas version: finer_feedback_settings {"name": "Question 20 TRUE/FALSE function", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "b"], "name": "Question 20 TRUE/FALSE function", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "
This function sets y = FALSE
if x = {b}
, or y = TRUE
if x is unequal to {b}. Line 1 sets x = {a}
, therefore y = TRUE
.
What is the value of $y$?
", "matrix": ["1", 0], "shuffleChoices": false, "variableReplacements": [], "choices": ["TRUE
FALSE
> x = {a}", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(1..5#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "random(6..10#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b", "description": ""}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}]}], "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}
> if(x=={b}) {
y = FALSE
} else {
y = TRUE
}