// Numbas version: finer_feedback_settings {"name": "Lentilles minces convergentes : constructions", "extensions": ["quantities"], "custom_part_types": [{"source": {"pk": 7, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/7/edit"}, "name": "Quantity with units", "short_name": "quantity", "description": "

The student enters a quantity with units.

", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nunits(correct_quantity)*abs(eval(settings[\"wiggle\"]))\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "

The scalar part of the student's quantity

", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "

The units of the student's quantity, before converting.

", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "

The units of the student's quantity.

\n

If the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.

", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "

The student's answer, interpreted as a quantity.

\n

Marking fails if the student does not enter a valid quantity.

", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "

Are the units of the student's quantity compatible with the units of the expected quantity?

", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "

/Are the student's quantity and the expected quantity in exactly the same units?

", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "

Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.

", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "

Is the student's quantity within the allowed tolerance of the expected answer?

", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "units(correct_quantity)*abs(eval(settings[\"wiggle\"]))"}, {"name": "valid_number", "description": "

Is the scalar part of the student's answer a valid number?

", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units:
\n", "input_type": "dropdown", "default_value": "incorrect", "choices": [{"value": "incorrect", "label": "Mark as incorrect"}, {"value": "prevent", "label": "Prevent submission"}, {"value": "convert", "label": "Mark as if correct units used"}]}, {"name": "different_units_action", "label": "What to do if different units used", "help_url": "", "hint": "If the student's answer is given in different units to the expected answer:
\n", "input_type": "dropdown", "default_value": "convert", "choices": [{"value": "convert", "label": "Convert"}, {"value": "warn", "label": "Warn and convert"}, {"value": "prevent", "label": "Prevent submission"}, {"value": "incorrect", "label": "Mark incorrect"}]}, {"name": "different_units_penalty", "label": "Penalty if different units used", "help_url": "", "hint": "This penalty is applied if the student gives their answer in different units to the expected answer. The selected percentage of the student's score is taken away.", "input_type": "percent", "default_value": "100"}, {"name": "wiggle", "label": "Margin of error", "help_url": "", "hint": "The student's answer is marked correct if the difference between it and the correct answer is at most this value, measured in the same units as the correct answer.", "input_type": "mathematical_expression", "default_value": "10^-12", "subvars": true}], "public_availability": "always", "published": true, "extensions": ["quantities"]}, {"source": {"pk": 239, "author": {"name": "Timur Zaripov", "pk": 3272}, "edit_page": "/part_type/239/edit"}, "name": "Quantity with units (relative tolerance)", "short_name": "quantity-with-units-relative-tolerance", "description": "

The student enters a quantity with units. Answer accepted as correct within range defined as percentage of expected answer.

", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])+\" to \"+string(settings[\"wiggle\"])+\"% accuracy\"\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nabs(eval(settings[\"wiggle\"]))*0.01*abs(settings[\"correctAnswer\"])\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "

The scalar part of the student's quantity

", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "

The units of the student's quantity, before converting.

", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "

The units of the student's quantity.

\n

If the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.

", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "

The student's answer, interpreted as a quantity.

\n

Marking fails if the student does not enter a valid quantity.

", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "

Are the units of the student's quantity compatible with the units of the expected quantity?

", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "

/Are the student's quantity and the expected quantity in exactly the same units?

", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "

Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.

", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "

Is the student's quantity within the allowed tolerance of the expected answer?

", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "abs(eval(settings[\"wiggle\"]))*0.01*abs(settings[\"correctAnswer\"])"}, {"name": "valid_number", "description": "

Is the scalar part of the student's answer a valid number?

", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units:
\n", "input_type": "dropdown", "default_value": "incorrect", "choices": [{"value": "incorrect", "label": "Mark as incorrect"}, {"value": "prevent", "label": "Prevent submission"}, {"value": "convert", "label": "Mark as if correct units used"}]}, {"name": "different_units_action", "label": "What to do if different units used", "help_url": "", "hint": "If the student's answer is given in different units to the expected answer:
\n", "input_type": "dropdown", "default_value": "convert", "choices": [{"value": "convert", "label": "Convert"}, {"value": "warn", "label": "Warn and convert"}, {"value": "prevent", "label": "Prevent submission"}, {"value": "incorrect", "label": "Mark incorrect"}]}, {"name": "different_units_penalty", "label": "Penalty if different units used", "help_url": "", "hint": "This penalty is applied if the student gives their answer in different units to the expected answer. The selected percentage of the student's score is taken away.", "input_type": "percent", "default_value": "100"}, {"name": "wiggle", "label": "Realtive margin of error in %", "help_url": "", "hint": "The student's answer is marked correct if the difference between it and the correct answer is at most this percentage of the correct answer.", "input_type": "mathematical_expression", "default_value": "2", "subvars": true}], "public_availability": "always", "published": true, "extensions": ["quantities"]}], "resources": [["question-resources/proj6.svg", "f07e274381f3150195c97030edcc3285aef5b6ec56df6e5d861994da1c4c7e32.svg"], ["question-resources/proj5-2.svg", "59c6e7de93ce319397b761d0f236aa548d0d0b9ddf50591951a041aaba0c4a7c.svg"], ["question-resources/proj5.svg", "ea992a2c775b34b83b89b6f9ca8455751eaf1799061b5b7614f0ed4b6f6d64e9.svg"], ["question-resources/proj4-3.svg", "29b9ff07b04652bde6eb81c9d244b76bf31bffbdd30fce821490ec19134d0669.svg"], ["question-resources/proj4.svg", "a5e856992c05df03ef48db3c5555b616842a05cfdceae8f40216f07afde5acc9.svg"], ["question-resources/proj3-2.svg", "c4786581cbec9014d86ebab509f4353b56fbaba18856e9619fdaf2c42cf437ad.svg"], ["question-resources/proj3.svg", "fb1ce0685556c148af5303415e11114d8dd51b62bdaa7bfa3723ae38c031bb45.svg"], ["question-resources/proj2.svg", "815fb50a7eae0cd08176d267101b072b2c4ed846310901a0ff83616bb0398519.svg"], ["question-resources/photo6.svg", "338cd123636b6790255d900c00e8adb25fa35300fd4290acf7a2f848b5e4f7ba.svg"], ["question-resources/photo3-4.svg", "a1c3c37fac49c95b9aa439eee2d06b5c9305f0b5e9962eb47baaea6099dfeea8.svg"], ["question-resources/photo2-5.svg", "6cd3226853d8f411d997a94cba1b5b2e8cdaf0d199ce2d3ac2e25a03c81bb987.svg"], ["question-resources/photo2-3.svg", "c9ac9d7b01606c90251c68ece953f0af5cf1631fd4a27e93dedb346badef336d.svg"], ["question-resources/photo1-6.svg", "1579e62c273b5455c6f4cce14be38065d1da0c1fe0a7ea82dbd6bc458e4e8d76.svg"], ["question-resources/photo1-5.svg", "449106be8bf8a5858dfc450f9c49e14e55fc296c53b2d0537d36e189ab6b53eb.svg"], ["question-resources/cor_photo1-4.svg", "58bed37e17fa76c0958a6811150f47f428fcfc7a18f464471b487fe8326b8c1f.svg"], ["question-resources/cor_photo1-3.svg", "9006e8eee8cca742dfc639c157e7e0f2077ceaad5495e3cc1d6b9bc964849746.svg"], ["question-resources/cor_photo1-2.svg", "540a51c3dd406105d1f66742271314abe4994f566cb8aa6a5e77b09432ceac6f.svg"], ["question-resources/cor_loupe6.svg", "6d75832a5ea2b13d6bee9829c22b57ca8f842371128968cbadda2b0a7497c29b.svg"], ["question-resources/cor_loupe5-2.svg", "9fc45a8e8ea1f5fc64aa5fadcb989482273326d6711bd4edff28818f9910f460.svg"], ["question-resources/cor_loupe5.svg", "64229947607bd33e9c3b04adcf8cd808645d4d35114643c301067c0e9c0a4e81.svg"], ["question-resources/cor_loupe4-3.svg", "9dfbf40863883beeeececde963452c8157762d7372fec3e7dcb5296edf4350b6.svg"], ["question-resources/cor_loupe4.svg", "56dbb3e928b3e09629668d2f8471b8d1ffa0190a2fb6e612ddab42633a450112.svg"], ["question-resources/cor_loupe3-2.svg", "3e02d38ee49fc8af3edf93753c27bde37db75fdf45075aae96d7491eb1e37c10.svg"], ["question-resources/cor_loupe3.svg", "fd0bf5947809a6de975000f04e4729215fb61f25461bcaacea4fee99e803aba4.svg"], ["question-resources/cor_loupe2.svg", "74cbbe4656546f111d7dd3f4417a53d806530351483de4a0dfbd65d810ed26b4.svg"], ["question-resources/photo1-4.svg", "06e3c1a9312d937be39ce3c6da56baba1fa1ff4a3ad02651f06fa1732dbe398f.svg"], ["question-resources/photo1-3.svg", "f119788256ba63a483e50d058c1529470ab4ceb225739bb8cd9e487d9c2e40bc.svg"], ["question-resources/photo1-2.svg", "3e3b752ff1ececbfeae98033a3b56fff705cd4e8e62bbea85d404bf8da755374.svg"], ["question-resources/loupe6.svg", "353407546ceffbdfc545715ff9cb32f62c059b09728bdf3461f820be95da73f2.svg"], ["question-resources/loupe5.svg", "113d9efcb45407f01737fa03bb1643e43480f17807bdd7638b6c7d9689614d7b.svg"], ["question-resources/loupe4-3.svg", "a41da1d32335b050890ce726d79be3e8567ae61e6ef0820721d5e9dcede06478.svg"], ["question-resources/loupe4.svg", "dead9ef27cc75c43893a34e420b25d6be3b19659bf2e35283f9af10ab75ff000.svg"], ["question-resources/loupe3-2.svg", "f23608144d3a5672d195b16cc8663aa18a5c7535050bcea5737d189cfa4857bc.svg"], ["question-resources/loupe3.svg", "f2ad2cf2e0ad519efc9de8184179b3b022b6d91737068d5eff3b09a3615a9b25.svg"], ["question-resources/loupe2-5.svg", "fb108b36c35de9d209d555506952688b54b23027dc55967ec9b95696006c4f9a.svg"], ["question-resources/loupe2.svg", "085367878e959c9c58f75292e512136b6243917c1698426d3a44d199346c8cce.svg"], ["question-resources/cor_proj6.svg", "2e2cbc47ec81ab6670ed95d1cdaeaa1cc1fe26be4e51e3327a800771ddb151d8.svg"], ["question-resources/cor_proj5-2.svg", "893de18e93d8c7740bdf0238301483de8f4846babb6d869a582da2dc7b819445.svg"], ["question-resources/cor_proj5.svg", "d1496425cb9e7f43e29961d3f70e5e7cbbd9ef377d0fed23dd096860aca17288.svg"], ["question-resources/cor_proj4-3.svg", "61094eed36626c1d543e24930414d6d239153ee27b8e7714a6ea7bd32d4969a9.svg"], ["question-resources/cor_proj4.svg", "69efa16fc90935fe25df5f2b76d9636cef687d9f6b32c36b9ff9f7f26e9a4770.svg"], ["question-resources/cor_proj3-2.svg", "392b449a3e9b2d22d239f2129b4ccbe78f5ac43ad064cced5d18a06b748fa358.svg"], ["question-resources/cor_proj2.svg", "0815df7bdf09807c820d80fc22bd77fcd9fe8f5b39edee2690ebf69b8c8c37dc.svg"], ["question-resources/cor_proj3.svg", "b6b22600540c3bc9a6f0af26e2e787cc4ba758e4038223f011ccbae5591d2519.svg"], ["question-resources/cor_photo1-6.svg", "aee0a8ed7baa582433d7c5a9adce518201507e4f62ca91fb27ecf99a43c5573f.svg"], ["question-resources/loupe5-2.svg", "fb108b36c35de9d209d555506952688b54b23027dc55967ec9b95696006c4f9a.svg"], ["question-resources/cor_photo1-5.svg", "8ed7ee6e7663eb6990e8363076ce982e4c43691dfac8a0161d776fc1b80349ae.svg"], ["question-resources/cor_photo2-3.svg", "f05516c55fa41a0bb588c261f2585b5955a5e37b2ca772c7d1176fead3833d62.svg"], ["question-resources/cor_photo3-4.svg", "c5628d4b151b8cf2a3221ac00e26446af0a0fd67ef07399d041b49a4c43a86eb.svg"], ["question-resources/cor_photo2-5.svg", "89d71039c32b6446ba236185246646d14a1f24a289194d3bc686ec8dd775c361.svg"]], "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": "Lentilles minces convergentes : constructions", "tags": [], "metadata": {"description": "

construction de l'image réelle ou virtuelle d'un objet plan par une lentille mince convergente

\n

prise de mesures algébriques

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": ["quantities"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"figure_vide": {"name": "figure_vide", "group": "Ungrouped variables", "definition": "random(keys(figures))", "description": "", "templateType": "anything", "can_override": false}, "corrige": {"name": "corrige", "group": "Ungrouped variables", "definition": "\"cor_\" + figure_vide", "description": "", "templateType": "anything", "can_override": false}, "oa1": {"name": "oa1", "group": "Ungrouped variables", "definition": "siground(f*(1/gamma-1),3)", "description": "", "templateType": "anything", "can_override": false}, "oa2": {"name": "oa2", "group": "Ungrouped variables", "definition": "siground(gamma*oa1,3)", "description": "", "templateType": "anything", "can_override": false}, "ab1": {"name": "ab1", "group": "Ungrouped variables", "definition": "quantity(figures[figure_vide][2],\"cm\")", "description": "", "templateType": "anything", "can_override": false}, "ab2": {"name": "ab2", "group": "Ungrouped variables", "definition": "siground(gamma*ab1,3)", "description": "", "templateType": "anything", "can_override": false}, "gamma": {"name": "gamma", "group": "Ungrouped variables", "definition": "figures[figure_vide][1]", "description": "", "templateType": "anything", "can_override": false}, "figures": {"name": "figures", "group": "Ungrouped variables", "definition": "[\"proj6\":[3,-6,1],\n \"proj5\":[2.5,-5,1],\n \"proj4\":[4,-4,1],\n \"proj3\":[4.5,-3,2],\n \"proj2\":[5,-2,3],\n \"proj5-2\":[5,-5/2,2],\n \"proj3-2\":[6,-3/2,4],\n \"proj4-3\":[6,-4/3,3],\n \"photo1-6\":[3,-1/6,6],\n \"photo1-5\":[2.5,-1/5,5],\n \"photo1-4\":[4,-1/4,4],\n \"photo1-3\":[4.5,-1/3,6],\n \"photo1-2\":[5,-1/2,6],\n \"photo2-5\":[5,-2/5,5],\n \"photo2-3\":[6,-2/3,6],\n \"photo3-4\":[6,-3/4,4],\n \"loupe6\":[3,6,1],\n \"loupe5\":[5,5,1],\n \"loupe4\":[6,4,1],\n \"loupe3\":[9,3,2],\n \"loupe2\":[12,2,3],\n \"loupe5-2\":[10,5/2,2],\n \"loupe3-2\":[12,3/2,4],\n \"loupe4-3\":[12,4/3,3],\n]", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "quantity(figures[figure_vide][0]*10,\"cm\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["figure_vide", "corrige", "oa1", "oa2", "ab1", "ab2", "gamma", "figures", "f"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Lentille mince convergente : construction d'image", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Reproduire la figure suivante sur une feuille de papier à grand carreaux.

\n

Construire l'image de l'objet AB par la lentille.

\n

{image('resources/question-resources/'+figure_vide+'.svg')}

\n
\nMéthode (cliquer pour déployer)\npour construire l'image du point B, il faut trouver l'intersection de deux rayons partant de B.

On connait le comportement de trois rayons :\n\nPour une image virtuelle, il faut prolonger les rayons sortants de la lentille en sens inverse.
L'image du point A se situe sur l'axe optique au même niveau que B'
\n

\n
\nCorrigé (cliquer pour déployer)\n{image('resources/question-resources/'+corrige+'.svg')}
\n

\n

L'image est [[0]] et [[1]]

\n
\n

On suppose que la largeur d'un carreau correspond à 10 cm en vrai, et la hauteur à 1 cm.

\n

Mesurer sur la figure les longueurs algébriques suivantes (donner l'unité) :

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\overline{OA}$$\\overline{AB}$$\\overline{OA'}$$\\overline{A'B'}$
[[2]][[4]][[3]][[5]]
\n

Estimer le grandissement algébrique : $\\gamma = \\frac{\\overline{A'B'}}{\\overline{AB}} = \\frac{\\overline{OA'}}{\\overline{OA}} = $ [[6]]

", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "r\u00e9elle/virtuelle", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["reelle", "virtuelle"], "matrix": ["award(1,gamma<0)", "award(1,gamma>0)"], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "droite/renvers\u00e9e", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["renversee", "droite"], "matrix": ["award(1,gamma<0)", "award(1,gamma>0)"], "distractors": ["", ""]}, {"type": "quantity", "useCustomName": true, "customName": "OA", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "oa1", "hint": "none", "allow_unitless": false, "incompatible_units_action": "incorrect", "different_units_action": "convert", "different_units_penalty": "0", "wiggle": "5"}}, {"type": "quantity", "useCustomName": true, "customName": "OA'", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "oa2", "hint": "none", "allow_unitless": false, "incompatible_units_action": "incorrect", "different_units_action": "convert", "different_units_penalty": "0", "wiggle": "5"}}, {"type": "quantity", "useCustomName": true, "customName": "AB", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "ab1", "hint": "none", "allow_unitless": false, "incompatible_units_action": "incorrect", "different_units_action": "convert", "different_units_penalty": "0", "wiggle": "0.5"}}, {"type": "quantity", "useCustomName": true, "customName": "A'B'", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "ab2", "hint": "none", "allow_unitless": false, "incompatible_units_action": "incorrect", "different_units_action": "convert", "different_units_penalty": "0", "wiggle": "0.5"}}, {"type": "quantity-with-units-relative-tolerance", "useCustomName": true, "customName": "gamma", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "siground(quantity(gamma,\"\"),3)", "hint": "none", "allow_unitless": true, "incompatible_units_action": "incorrect", "different_units_action": "convert", "different_units_penalty": "0", "wiggle": "10"}}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false, "contributors": [{"name": "Vincent Tugaye", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21425/"}], "resources": ["question-resources/proj6.svg", "question-resources/proj5-2.svg", "question-resources/proj5.svg", "question-resources/proj4-3.svg", "question-resources/proj4.svg", "question-resources/proj3-2.svg", "question-resources/proj3.svg", "question-resources/proj2.svg", "question-resources/photo6.svg", "question-resources/photo3-4.svg", "question-resources/photo2-5.svg", "question-resources/photo2-3.svg", "question-resources/photo1-6.svg", "question-resources/photo1-5.svg", "question-resources/cor_photo1-4.svg", "question-resources/cor_photo1-3.svg", "question-resources/cor_photo1-2.svg", "question-resources/cor_loupe6.svg", "question-resources/cor_loupe5-2.svg", "question-resources/cor_loupe5.svg", "question-resources/cor_loupe4-3.svg", "question-resources/cor_loupe4.svg", "question-resources/cor_loupe3-2.svg", "question-resources/cor_loupe3.svg", "question-resources/cor_loupe2.svg", "question-resources/photo1-4.svg", "question-resources/photo1-3.svg", "question-resources/photo1-2.svg", "question-resources/loupe6.svg", "question-resources/loupe5.svg", "question-resources/loupe4-3.svg", "question-resources/loupe4.svg", "question-resources/loupe3-2.svg", "question-resources/loupe3.svg", "question-resources/loupe2-5.svg", "question-resources/loupe2.svg", "question-resources/cor_proj6.svg", "question-resources/cor_proj5-2.svg", "question-resources/cor_proj5.svg", "question-resources/cor_proj4-3.svg", "question-resources/cor_proj4.svg", "question-resources/cor_proj3-2.svg", "question-resources/cor_proj2.svg", "question-resources/cor_proj3.svg", "question-resources/cor_photo1-6.svg", "question-resources/loupe5-2.svg", "question-resources/cor_photo1-5.svg", "question-resources/cor_photo2-3.svg", "question-resources/cor_photo3-4.svg", "question-resources/cor_photo2-5.svg"]}]}], "contributors": [{"name": "Vincent Tugaye", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21425/"}]}