// Numbas version: finer_feedback_settings
{"name": "Algebra: Collect like terms 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Algebra: Collect like terms 1", "tags": [], "metadata": {"description": "
If possible, simplify simple expressions by collecting like terms.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Where possible, simplify by collecting like terms: $\\var{q1}$
", "advice": "\n
Since there are no like terms in the expression $\\var{q1}$, it cannot be simplified.
\n
\n\n
Since there are mutiple $\\var{terms_in_answer}$ terms in the expression $\\var{q1}$, it can be simplified. By collecting the $\\var{terms_in_answer}$ terms, the expression simplifies to $\\var{ans_1}$.
\n
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"term_1": {"name": "term_1", "group": "Ungrouped variables", "definition": "(string(random(-5..5 except 0)) + random(['a','b','c']))", "description": "", "templateType": "anything", "can_override": false}, "term_2": {"name": "term_2", "group": "Ungrouped variables", "definition": "(string(random(-5..5 except 0)) + random(['a','b','c']))", "description": "", "templateType": "anything", "can_override": false}, "term_3": {"name": "term_3", "group": "Ungrouped variables", "definition": "(string(random(-5..5 except 0)) + random(['a','b','c']))", "description": "", "templateType": "anything", "can_override": false}, "ans_1": {"name": "ans_1", "group": "Ungrouped variables", "definition": "simplify(expression(term_1 +\"+\" +term_2 +\"+\" +term_3),\"all\")", "description": "", "templateType": "anything", "can_override": false}, "q1": {"name": "q1", "group": "Ungrouped variables", "definition": "simplify(expression(term_1 +\"+\" +term_2 +\"+\" +term_3),[\"unitFactor\",\"collectNumbers\",\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "a_terms": {"name": "a_terms", "group": "Ungrouped variables", "definition": "filter(\"a\" in x, x, [term_1,term_2,term_3] )", "description": "", "templateType": "anything", "can_override": false}, "b_terms": {"name": "b_terms", "group": "Ungrouped variables", "definition": "filter(\"b\" in x, x, [term_1,term_2,term_3])", "description": "", "templateType": "anything", "can_override": false}, "c_terms": {"name": "c_terms", "group": "Ungrouped variables", "definition": "filter(\"c\" in x, x, [term_1,term_2,term_3] )", "description": "", "templateType": "anything", "can_override": false}, "terms_in_answer": {"name": "terms_in_answer", "group": "Ungrouped variables", "definition": "switch(len(a_terms)>1,expression(\"a\"),len(b_terms)>1,expression(\"b\"),len(c_terms)>1,expression(\"c\"),\"none\")", "description": "", "templateType": "anything", "can_override": false}, "no_like_terms": {"name": "no_like_terms", "group": "Ungrouped variables", "definition": "if(terms_in_answer=\"none\",true,false)", "description": "", "templateType": "anything", "can_override": false}, "like_terms": {"name": "like_terms", "group": "Ungrouped variables", "definition": "not no_like_terms", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["term_1", "term_2", "term_3", "ans_1", "q1", "a_terms", "b_terms", "c_terms", "terms_in_answer", "no_like_terms", "like_terms"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{ans_1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ed Southwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2415/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "resources": []}]}], "contributors": [{"name": "Ed Southwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2415/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}