// Numbas version: finer_feedback_settings {"name": "Fractions alg\u00e9briques (m\u00eame d\u00e9nominateur)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Fractions alg\u00e9briques (m\u00eame d\u00e9nominateur)", "tags": [], "metadata": {"description": "

Platine

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Pour rappel, une fraction implique des parenthèses. Par exemple, $\\dfrac{ax+b}{bx+c}=(ax+b)/(bx+c)$.

", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Valeurs g\u00e9n\u00e9riques 2..5", "definition": "repeat(random(2..5),20)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "2 ou 3", "definition": "repeat(random(2..3),10)", "description": "

Random 2..3

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Valeurs g\u00e9n\u00e9riques 2..5", "definition": "repeat(random(6..11),20)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Multiples avec 2 3 5", "definition": "repeat(random([12, 15, 16, 18, 20, 24]),20)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Multiples avec 2 3 5", "definition": "repeat(random([12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48]),20)", "description": "", "templateType": "anything", "can_override": false}, "r": {"name": "r", "group": "Multiples avec 2 3 5", "definition": "repeat(random([2,3,5,6,8,9,10,12]),20)", "description": "", "templateType": "anything", "can_override": false}, "e": {"name": "e", "group": "Pair 2..8", "definition": "repeat(random(2,4,6,8),20)", "description": "", "templateType": "anything", "can_override": false}, "sol3": {"name": "sol3", "group": "Q3", "definition": "({a[2]}+{a[1]}^2)/{a[0]}-{a[1]}", "description": "", "templateType": "anything", "can_override": false}, "ce3_1": {"name": "ce3_1", "group": "Q3", "definition": "{a[1]}", "description": "", "templateType": "anything", "can_override": false}, "ce3_2": {"name": "ce3_2", "group": "Q3", "definition": "-{a[1]}", "description": "", "templateType": "anything", "can_override": false}, "sol_egale_ce3": {"name": "sol_egale_ce3", "group": "Q3", "definition": "sol3 = ce3_1 or sol3 = ce3_2", "description": "", "templateType": "anything", "can_override": false}, "correct_gap1_3": {"name": "correct_gap1_3", "group": "Q3", "definition": "if(sol3 = ce3_1 or sol3 = ce3_2,1,0)", "description": "", "templateType": "anything", "can_override": false}, "o": {"name": "o", "group": "Pair 2..8", "definition": "repeat(random(3,5,7,11),20)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Valeurs g\u00e9n\u00e9riques 2..5", "variables": ["b", "a"]}, {"name": "2 ou 3", "variables": ["d"]}, {"name": "Impair (3,5)", "variables": []}, {"name": "Multiples avec 2 3 5", "variables": ["p", "q", "r"]}, {"name": "Pair 2..8", "variables": ["e", "o"]}, {"name": "Q3", "variables": ["sol3", "ce3_1", "ce3_2", "sol_egale_ce3", "correct_gap1_3"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Calcule et écris ta réponse sous forme d'une seule fraction simplifiée au maximum.

\n

$\\dfrac{\\var{e[0]}}{x+\\var{a[3]}}-\\dfrac{\\var{o[1]}}{x}$

", "answer": "{e[0]}/(x+{a[3]})-{o[1]}/x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "(`+-$n`?*$v;=x`?+`+-$n`?)/(`+-$n`?*$v;=x^2`?+`+-$n`?*$v;=x`?)", "partialCredit": 0, "message": "La réponse doit être une fraction dont le numérateur et dénominateur sont développés au maximum.", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [{"name": "x", "value": ""}], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Calcule et écris ta réponse sous forme d'une seule fraction simplifiée au maximum.

\n

$\\dfrac{\\var{b[0]}}{x^2-\\simplify{{a[4]}^2}}+\\dfrac{\\var{b[1]}}{x+\\var{a[4]}}$

", "answer": "{b[0]}/(x^2-{a[4]}^2)+{b[1]}/(x+{a[4]})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "(`+-$n`?*$v;=x`?+`+-$n`?)/(`+-$n`?*$v;=x^2`?+`+-$n`?)", "partialCredit": 0, "message": "La réponse doit être une fraction dont le numérateur et dénominateur sont développés au maximum.", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "marked_original_order (Mark the gaps in the original order, mainly to establish if every gap has a valid answer):\n map(\n mark_part(gap[\"path\"],studentAnswer),\n [gap,studentAnswer],\n zip(gaps,studentAnswer)\n )\n\ninterpreted_answers (The interpreted answers for each gap, in the original order):\n map(\n res[\"values\"][\"interpreted_answer\"],\n res,\n marked_original_order\n )\n\nanswers (The student's answers to each gap):\n if(settings[\"sortAnswers\"],\n sort(interpreted_answers)\n ,\n interpreted_answers\n )\n\ngap_order:\n if(settings[\"sortAnswers\"],\n sort_destinations(interpreted_answers)\n ,\n gap_adaptive_order\n )\n\nanswer_order:\n if(settings[\"sortAnswers\"],\n 0..(len(studentAnswer)-1)\n ,\n gap_adaptive_order\n )\n\ngap_feedback (Feedback on each of the gaps):\n map(\n try(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n gap, gaps[gap_number],\n name, gap[\"name\"],\n noFeedbackIcon, not gap[\"settings\"][\"showFeedbackIcon\"],\n non_warning_feedback, filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]),\n assert(noFeedbackIcon,\n assert(name=\"\" or len(gaps)=1 or len(non_warning_feedback)=0,feedback(translate('part.gapfill.feedback header',[\"name\": name])))\n );\n concat_feedback(non_warning_feedback, if(marks>0,result[\"marks\"]/marks,1/len(gaps)), noFeedbackIcon);\n result\n ),\n err,\n fail(translate(\"part.gapfill.error marking gap\",[\"name\": gaps[gap_number][\"name\"], \"message\": err]))\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )\n\nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"],res,marked_original_order))\n\nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n let(\n num_gaps, len(marked_original_order),\n expected_gaps, len(gaps),\n \n if(num_gaps < expected_gaps,\n // S\u00e9curit\u00e9 anti-plantage si l'\u00e9l\u00e8ve n'a pas tout rempli\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : Nombre de solutions\n sol_res, marked_original_order[ 1 ], // gap1 : Solution de l'\u00e9quation\n \n ans, choice_res[\"values\"][\"interpreted_answer\"],\n \n // D\u00e9tection ultra-robuste de l'option choisie par l'\u00e9l\u00e8ve (g\u00e8re listes, bool\u00e9ens et entiers)\n student_chose_0, choice_res[\"valid\"] and len(ans) > 0 and (\n ans = [ 0 ] or \n ans = [ [true, false, false] ] or \n (type(ans[ 0 ]) = \"list\" and len(ans[ 0 ]) > 0 and ans[ 0 ][ 0 ]) or \n ans[ 0 ] = 0\n ),\n \n student_chose_1, choice_res[\"valid\"] and len(ans) > 0 and (\n ans = [ 1 ] or \n ans = [ [false, true, false] ] or \n (type(ans[ 0 ]) = \"list\" and len(ans[ 0 ]) > 1 and ans[ 0 ][ 1 ]) or \n ans[ 0 ] = 1\n ),\n \n student_chose_2, choice_res[\"valid\"] and len(ans) > 0 and (\n ans = [ 2 ] or \n ans = [ [false, false, true] ] or \n (type(ans[ 0 ]) = \"list\" and len(ans[ 0 ]) > 2 and ans[ 0 ][ 2 ]) or \n ans[ 0 ] = 2\n ),\n \n if(choice_res[\"credit\"] < 1,\n // CAS 1 : Le choix du nombre de solutions est faux -> 0 point\n apply(choice_res[\"feedback\"]) ;\n set_credit(0, \"Le nombre de solutions choisi est incorrect.\")\n ,\n // CAS 2 : Le choix du nombre de solutions est correct\n if(student_chose_0,\n // Option \"0 solution\" choisie et valid\u00e9e -> R\u00e9ussite imm\u00e9diate (pas d'\u00e9valuation de la solution)\n apply(choice_res[\"feedback\"]) ;\n set_credit(1, \"Correct ! L'\u00e9quation n'admet effectivement aucune solution.\")\n ,\n // Option \"1 solution\" ou \"2 solutions\" choisie et valid\u00e9e -> On \u00e9value la solution saisie\n apply(choice_res[\"feedback\"]) ;\n apply(sol_res[\"feedback\"]) ;\n if(sol_res[\"credit\"] = 1,\n set_credit(1, \"Excellent ! Le nombre de solutions est correct et la solution propos\u00e9e est exacte.\")\n ,\n set_credit(0, \"Le nombre de solutions est correct, mais la solution finale est fausse ou incompl\u00e8te.\")\n )\n )\n )\n )\n )\n )\n\ninterpreted_answer:\n answers\n\npre_submit:\n map(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n check_pre_submit(gaps[gap_number][\"path\"], answer, exec_path)\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Étant donnée l'équation suivante,

\n

$1+\\dfrac{\\var{a[0]}}{x-\\var{a[1]}}=\\dfrac{\\var{a[2]}+x^2}{x^2-\\simplify{{a[1]}^2}}$

\n

combien y a-t-il de solutions à l'équation ?

\n

 [[0]]

\n

S'il y en a, donne-en une. x = [[1]] (si non, laisse vide)

\n

", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "Sol ?", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["0", "1", "2"], "matrix": ["if(sol_egale_ce3, 0.5, 0)", "if(sol_egale_ce3, 0, 0.5)", 0], "distractors": ["", "", ""]}, {"type": "jme", "useCustomName": true, "customName": "Sol", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{sol3}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false, "contributors": [{"name": "Robin Lecocq", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38160/"}], "resources": []}]}], "contributors": [{"name": "Robin Lecocq", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38160/"}]}