// Numbas version: finer_feedback_settings {"name": "\u00c9quations du 2e degr\u00e9", "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": "\u00c9quations du 2e degr\u00e9", "tags": [], "metadata": {"description": "
Grand champion
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Résous les équations suivantes dans $\\mathbb{R}$.
\n$\\sqrt{x}$ doit être tapé sqrt(x)
", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"e": {"name": "e", "group": "Pair 2..8", "definition": "repeat(random(2,4,6,8),20)", "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}, "carrea": {"name": "carrea", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "repeat(random(1,4),20)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "repeat(random(-1,-2,-3,2,3),20)", "description": "", "templateType": "anything", "can_override": false}, "sgn": {"name": "sgn", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "repeat(random(1,-1),20)", "description": "", "templateType": "anything", "can_override": false}, "pa": {"name": "pa", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "map(-1*a[i]*carrea[i], i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "map(random((-2..2) except [0, sqrt(carrea[i]),-sqrt(carrea[i])]), i, 0..(len(carrea)-1))", "description": "", "templateType": "anything", "can_override": false}, "ba": {"name": "ba", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "map(-2*a[i]*q[i], i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "ca": {"name": "ca", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "map(a[i]*q[i]*q[i]+pa[i], i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "xa1": {"name": "xa1", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "map(min(((-ba[i]-sqrt(Da[i]))/(2*a[i])),((-ba[i]+sqrt(Da[i]))/(2*a[i]))), i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "xa2": {"name": "xa2", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "map(max(((-ba[i]-sqrt(ba[i]*ba[i]-4*a[i]*ca[i]))/(2*a[i])),((-ba[i]+sqrt(ba[i]*ba[i]-4*a[i]*ca[i]))/(2*a[i]))), i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "Da": {"name": "Da", "group": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "definition": "map(ba[i]*ba[i]-4*a[i]*ca[i], i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "xz11": {"name": "xz11", "group": "a=1 sol enti\u00e8res", "definition": "repeat(random(-5..2 except 0),20)", "description": "", "templateType": "anything", "can_override": false}, "dxz12xz11": {"name": "dxz12xz11", "group": "a=1 sol enti\u00e8res", "definition": "map(random((1..4) except [-2*xz11[i],-xz11[i]]),i,0..len(xz11)-1)", "description": "", "templateType": "anything", "can_override": false}, "xz12": {"name": "xz12", "group": "a=1 sol enti\u00e8res", "definition": "map(xz11[i]+dxz12xz11[i],i,0..len(xz11)-1)", "description": "", "templateType": "anything", "can_override": false}, "Dz1": {"name": "Dz1", "group": "a=1 sol enti\u00e8res", "definition": "map((xz12[i]-xz11[i])^2,i,0..len(xz11)-1)", "description": "", "templateType": "anything", "can_override": false}, "bz1": {"name": "bz1", "group": "a=1 sol enti\u00e8res", "definition": "map(-xz11[i]-xz12[i],i,0..len(xz11)-1)", "description": "", "templateType": "anything", "can_override": false}, "cz1": {"name": "cz1", "group": "a=1 sol enti\u00e8res", "definition": "map(xz11[i]*xz12[i],i,0..len(xz11)-1)", "description": "", "templateType": "anything", "can_override": false}, "bn": {"name": "bn", "group": "Delta n\u00e9gatif", "definition": "repeat(random(-6..6),20)", "description": "", "templateType": "anything", "can_override": false}, "cn": {"name": "cn", "group": "Delta n\u00e9gatif", "definition": "map(random((floor(x^2/4)+1)..10 except 0), x, bn)", "description": "", "templateType": "anything", "can_override": false}, "intr": {"name": "intr", "group": "Ungrouped variables", "definition": "repeat(random(2,3),20)", "description": "", "templateType": "anything", "can_override": false}, "pr": {"name": "pr", "group": "Ungrouped variables", "definition": "map(-1*a[i]*intr[i], i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "br": {"name": "br", "group": "Ungrouped variables", "definition": "map(-2*a[i]*q[i], i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "cr": {"name": "cr", "group": "Ungrouped variables", "definition": "map(a[i]*q[i]*q[i]+pr[i], i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "Dr": {"name": "Dr", "group": "Ungrouped variables", "definition": "map(br[i]*br[i]-4*a[i]*cr[i], i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "xr1": {"name": "xr1", "group": "Ungrouped variables", "definition": "map(min(((-br[i]-sqrt(Dr[i]))/(2*a[i])),((-br[i]+sqrt(Dr[i]))/(2*a[i]))), i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "xr2": {"name": "xr2", "group": "Ungrouped variables", "definition": "map(max(((-br[i]-sqrt(Dr[i]))/(2*a[i])),((-br[i]+sqrt(Dr[i]))/(2*a[i]))), i, 0..(len(a)-1))", "description": "", "templateType": "anything", "can_override": false}, "br1": {"name": "br1", "group": "Ungrouped variables", "definition": "map(abs(random(1..5 except br[i]))*(br[i]/abs(br[i])),i,0..len(br)-1)", "description": "", "templateType": "anything", "can_override": false}, "br2": {"name": "br2", "group": "Ungrouped variables", "definition": "map(br1[i]-br[i],i,0..len(br)-1)", "description": "", "templateType": "anything", "can_override": false}, "cr1": {"name": "cr1", "group": "Ungrouped variables", "definition": "map(random(-7..7 except [0,cr[i]]),i,0..len(cr)-1)", "description": "", "templateType": "anything", "can_override": false}, "cr2": {"name": "cr2", "group": "Ungrouped variables", "definition": "map(cr1[i]-cr[i],i,0..len(cr)-1)", "description": "", "templateType": "anything", "can_override": false}, "b0": {"name": "b0", "group": "Delta nul", "definition": "repeat(random(-12..12 except 0),20)", "description": "", "templateType": "anything", "can_override": false}, "x0": {"name": "x0", "group": "Delta nul", "definition": "map(((-b0[i])/(2*a[i])),i,0..len(b0)-1)", "description": "", "templateType": "anything", "can_override": false}, "b01": {"name": "b01", "group": "Delta nul", "definition": "map(abs(random(1..5 except b0[i]))*(b0[i]/abs(b0[i])),i,0..len(b0)-1)", "description": "", "templateType": "anything", "can_override": false}, "b02": {"name": "b02", "group": "Delta nul", "definition": "map(b01[i]-b0[i],i,0..len(b0)-1)", "description": "", "templateType": "anything", "can_override": false}, "c01": {"name": "c01", "group": "Delta nul", "definition": "map(abs(random(1..5 except c0[i]))*(c0[i]/abs(c0[i])),i,0..len(c0)-1)", "description": "", "templateType": "anything", "can_override": false}, "c0": {"name": "c0", "group": "Delta nul", "definition": "map(b0[i]*b0[i]/(4*a[i]),i,0..len(b0)-1)", "description": "", "templateType": "anything", "can_override": false}, "c02": {"name": "c02", "group": "Delta nul", "definition": "map(c01[i]-c0[i],i,0..len(c0)-1)", "description": "", "templateType": "anything", "can_override": false}, "intq": {"name": "intq", "group": "a=1 sol quelconques", "definition": "repeat(random(2,3,5,6,7,8,10),20)", "description": "", "templateType": "anything", "can_override": false}, "pq": {"name": "pq", "group": "a=1 sol quelconques", "definition": "map(-intq[i],i,0..len(intq)-1)", "description": "", "templateType": "anything", "can_override": false}, "bq": {"name": "bq", "group": "a=1 sol quelconques", "definition": "map(-2*q[i],i,0..len(q)-1)", "description": "", "templateType": "anything", "can_override": false}, "cq": {"name": "cq", "group": "a=1 sol quelconques", "definition": "map(q[i]*q[i]+pq[i],i,0..len(q)-1)", "description": "", "templateType": "anything", "can_override": false}, "xq1": {"name": "xq1", "group": "a=1 sol quelconques", "definition": "map(q[i]-sqrt(-pq[i]),i,0..len(q)-1)", "description": "", "templateType": "anything", "can_override": false}, "xq2": {"name": "xq2", "group": "a=1 sol quelconques", "definition": "map(q[i]+sqrt(-pq[i]),i,0..len(q)-1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["intr", "pr", "br", "cr", "Dr", "xr1", "xr2", "br1", "br2", "cr1", "cr2"], "variable_groups": [{"name": "Pair 2..8", "variables": ["e", "o"]}, {"name": "Eq 2e degr\u00e9 a non 1 sol enti\u00e8res", "variables": ["carrea", "a", "sgn", "pa", "q", "ba", "ca", "xa1", "xa2", "Da"]}, {"name": "a=1 sol enti\u00e8res", "variables": ["xz11", "dxz12xz11", "xz12", "Dz1", "bz1", "cz1"]}, {"name": "Delta n\u00e9gatif", "variables": ["bn", "cn"]}, {"name": "a=1 non entiere", "variables": []}, {"name": "Delta nul", "variables": ["b0", "x0", "b01", "b02", "c01", "c0", "c02"]}, {"name": "a=1 sol quelconques", "variables": ["intq", "pq", "bq", "cq", "xq1", "xq2"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Q1", "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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1 and gap2_res[\"credit\"] = 1,\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\sqrt{x}$ doit être écrit sqrt(x)
\n$\\simplify{x^2+{bz1[0]}x+{cz1[0]}}=0$
\nCombien cette équation admet-elle de solutions ?
\n[[0]]
\nLa plus petite solution est [[1]] et la plus grande est [[2]]
", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "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": [0, 0, "0.34"], "distractors": ["", "", ""]}, {"type": "jme", "useCustomName": true, "customName": "x1", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xz11[0]}", "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 ) `| `+- $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": []}, {"type": "jme", "useCustomName": true, "customName": "x2", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xz12[0]}", "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 ) `| `+- $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}, {"type": "gapfill", "useCustomName": true, "customName": "Q2", "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 choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1,\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\simplify{x^2+{bn[0]}x+{cn[0]}}=0$
\nCombien cette équation admet-elle de solutions ?
\n[[0]]
\nLa plus petite solution est [[1]] et la plus grande est [[2]]
", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "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": ["0.34", 0, "0"], "distractors": ["", "", ""]}, {"type": "jme", "useCustomName": true, "customName": "x1", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xz11[0]}", "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 ) `| `+- $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": []}, {"type": "jme", "useCustomName": true, "customName": "x2", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xz12[0]}", "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 ) `| `+- $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}, {"type": "gapfill", "useCustomName": true, "customName": "Q3", "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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1 and gap2_res[\"credit\"] = 1,\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\simplify{{a[1]}*x^2+{br1[1]}x+{cr1[1]}}=\\simplify{{br2[1]}*x+{cr2[1]}}$
\nCombien cette équation admet-elle de solutions ?
\n[[0]]
\nLa plus petite solution est [[1]] et la plus grande est [[2]]
", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "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": [0, 0, "0.34"], "distractors": ["", "", ""]}, {"type": "jme", "useCustomName": true, "customName": "x1", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xr1[1]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "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": []}, {"type": "jme", "useCustomName": true, "customName": "x2", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xr2[1]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "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}, {"type": "gapfill", "useCustomName": true, "customName": "Q4", "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 // R\u00e9cup\u00e9ration de la liste des r\u00e9sultats d'\u00e9valuation de Numbas\n results, gap_feedback,\n \n // \u00c9VALUATION DU QCM (gap0) - Index [ 0 ]\n qcm_correct, len(results) > 0 and results[ 0 ][\"credit\"] = 1,\n \n // \u00c9VALUATION DE Q1 (gap1) - Index [ 1 ]\n q1_answered, len(results) > 1 and results[ 1 ][\"answered\"],\n q1_correct, q1_answered and results[ 1 ][\"credit\"] = 1,\n q1_empty, not q1_answered,\n \n // \u00c9VALUATION DE Q2 (gap2) - Index [ 2 ]\n q2_answered, len(results) > 2 and results[ 2 ][\"answered\"],\n q2_correct, q2_answered and results[ 2 ][\"credit\"] = 1,\n q2_empty, not q2_answered,\n \n // V\u00c9RIFICATION DES 3 SC\u00c9NARIOS AUTORIS\u00c9S (Tout ou Rien)\n cond1, q1_correct and q2_empty, // Cas 1 : Uniquement Q1 de correct, Q2 vide\n cond2, q2_correct and q1_empty, // Cas 2 : Uniquement Q2 de correct, Q1 vide\n cond3, q1_correct and q2_correct, // Cas 3 : Les deux solutions sont correctes\n \n is_correct, qcm_correct and (cond1 or cond2 or cond3)\n ,\n // APPLICATION S\u00c9LECTIVE ET S\u00c9CURIS\u00c9E DU FEEDBACK VISUEL (Ternaire respect\u00e9e)\n if(len(results) > 0, apply(results[ 0 ][\"feedback\"]), \"\"),\n if(len(results) > 1 and q1_answered, apply(results[ 1 ][\"feedback\"]), \"\"),\n if(len(results) > 2 and q2_answered, apply(results[ 2 ][\"feedback\"]), \"\"),\n \n // Attribution des points (Tout ou Rien)\n if(is_correct,\n set_credit(1, \"Excellent ! Votre r\u00e9ponse est parfaitement coh\u00e9rente.\")\n ,\n if(not qcm_correct,\n set_credit(0, \"Le choix effectu\u00e9 au QCM est incorrect.\")\n ,\n set_credit(0, \"Le choix du QCM est correct, mais les solutions saisies ne correspondent pas \u00e0 ce choix.\")\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": "$\\simplify{{a[2]}*x^2+{b01[2]}x}=\\simplify{{b02[2]}*x-(({b0[2]}*{b0[2]})/(4*{a[2]}))}$
\nCombien cette équation admet-elle de solutions ?
\n[[0]]
\nLa plus petite solution est [[1]] et la plus grande est [[2]]
", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "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": [0, "0.34", "0"], "distractors": ["", "", ""]}, {"type": "jme", "useCustomName": true, "customName": "x1", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{x0[2]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "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": []}, {"type": "jme", "useCustomName": true, "customName": "x2", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{x0[2]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "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}, {"type": "gapfill", "useCustomName": true, "customName": "Q5", "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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1 and gap2_res[\"credit\"] = 1,\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\simplify{{a[3]}*x^2+{ca[3]}}=\\simplify{-{ba[3]}*x}$
\nCombien cette équation admet-elle de solutions ?
\n[[0]]
\nLa plus petite solution est [[1]] et la plus grande est [[2]]
", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "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": [0, 0, "0.34"], "distractors": ["", "", ""]}, {"type": "jme", "useCustomName": true, "customName": "x1", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xa1[3]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "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": []}, {"type": "jme", "useCustomName": true, "customName": "x2", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xa2[3]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "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}, {"type": "gapfill", "useCustomName": true, "customName": "Q6", "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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1 and gap2_res[\"credit\"] = 1,\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\simplify{-x^2-{bq[4]}*x}=\\simplify{{cq[4]}}$
\nCombien cette équation admet-elle de solutions ?
\n[[0]]
\nLa plus petite solution est [[1]] et la plus grande est [[2]]
", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "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": [0, 0, "0.34"], "distractors": ["", "", ""]}, {"type": "jme", "useCustomName": true, "customName": "x1", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xq1[4]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "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": []}, {"type": "jme", "useCustomName": true, "customName": "x2", "marks": "0.33", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{xq2[4]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "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/"}]}