// Numbas version: finer_feedback_settings {"name": "Question 6 types of variables", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "type", "possible_values", "logical_values", "double_values", "dataframe_values", "character_values", "value"], "name": "Question 6 types of variables", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "
\"5\"
is a character, not a double!", "rulesets": {}, "parts": [{"displayColumns": 0, "prompt": "
What type of variable is $x$?
", "matrix": ["if(type=0,1,0)", "if(type=1,1,0)", "if(type=2,1,0)", "if(type=3,1,0)"], "shuffleChoices": false, "variableReplacements": [], "choices": ["Character
", "Logical
", "Double
", "Data frame
"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "extensions": [], "statement": "> x = {value}", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(-10..10#3)", "templateType": "randrange", "group": "Ungrouped variables", "name": "a", "description": ""}, "logical_values": {"definition": "[true,false]", "templateType": "anything", "group": "Ungrouped variables", "name": "logical_values", "description": ""}, "dataframe_values": {"definition": "[repeat(random(-5..5#0.1),5)]", "templateType": "anything", "group": "Ungrouped variables", "name": "dataframe_values", "description": ""}, "possible_values": {"definition": "switch(\n type=0,\n character_values,\n type=1,\n logical_values,\n type=2,\n double_values,\n type=3,\n dataframe_values\n)", "templateType": "anything", "group": "Ungrouped variables", "name": "possible_values", "description": "
Possible values for the given data type
"}, "value": {"definition": "random(possible_values)", "templateType": "anything", "group": "Ungrouped variables", "name": "value", "description": ""}, "character_values": {"definition": "['\"'+random([\"Fred\",\"x\"]+logical_values+double_values)+'\"']", "templateType": "anything", "group": "Ungrouped variables", "name": "character_values", "description": ""}, "double_values": {"definition": "repeat(random(1..10),3)+\nrepeat(random(-10..-1),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "double_values", "description": ""}, "type": {"definition": "random([0,1,2])", "templateType": "anything", "group": "Ungrouped variables", "name": "type", "description": "0 - character
\n1 - logical
\n2 - double
\n3 - data frame
"}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}