// Numbas version: finer_feedback_settings {"name": "Pythagorean Theorem", "extensions": [], "custom_part_types": [{"source": {"pk": 3, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/3/edit"}, "name": "Give a numerical input for an expression", "short_name": "give-a-numerical-input-for-an-expression", "description": "

The student gives a point $x$ at which to evaluate a given function $f$. The answer is correct if $f(x)$ is the expected value.

", "help_url": "", "input_widget": "number", "input_options": {"correctAnswer": "settings[\"correctAnswer\"]", "hint": {"static": true, "value": ""}, "allowedNotationStyles": {"static": true, "value": ["plain", "en", "si-en"]}, "allowFractions": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(equal,\n correct()\n,\n incorrect(settings[\"student_value_description\"]+\" $\"+student_value+\"$.\")\n)\n\ninterpreted_answer:\nstudentAnswer\n\nstudent_value:\neval(settings[\"expression\"],[\"x\":studentAnswer])\n\nequal:\nwithintolerance(student_value,settings[\"expected_value\"],0.00001)", "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": "if(equal,\n correct()\n,\n incorrect(settings[\"student_value_description\"]+\" $\"+student_value+\"$.\")\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer"}, {"name": "student_value", "description": "", "definition": "eval(settings[\"expression\"],[\"x\":studentAnswer])"}, {"name": "equal", "description": "", "definition": "withintolerance(student_value,settings[\"expected_value\"],0.00001)"}], "settings": [{"name": "expected_value", "label": "Expected value", "help_url": "", "hint": "The value that the function should take at the given point.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The value that the student should write.", "input_type": "string", "default_value": "", "subvars": true}, {"name": "student_value_description", "label": "Description of the student's value", "help_url": "", "hint": "", "input_type": "string", "default_value": "The value at your point is", "subvars": true}, {"name": "expression", "label": "Function to evaluate", "help_url": "", "hint": "The function that will be applied to the student's number.
The student's number will be substituted for $x$ in this expression.", "input_type": "mathematical_expression", "default_value": "", "subvars": true}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

Two sides of a right triangle are x m and y m long. What is the length of the hypotenuse?

", "parts": [{"showCorrectAnswer": true, "marks": 1, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "type": "give-a-numerical-input-for-an-expression", "customMarkingAlgorithm": "", "variableReplacements": [], "settings": {"student_value_description": "The value at your point is", "correctAnswer": "", "expression": "", "expected_value": ""}, "prompt": "

Two sides of a right triangle are [x] and [y] m in legth. What is the length of the hypotenuse?

", "unitTests": [], "variableReplacementStrategy": "originalfirst"}], "variables": {"y": {"name": "y", "description": "

another side length, units: m.

", "definition": "random(3..7#0.01)", "group": "Unnamed group", "templateType": "randrange"}, "x": {"name": "x", "description": "

one length of triangle

", "definition": "random(2..5#0.01)", "group": "Ungrouped variables", "templateType": "randrange"}}, "tags": [], "preamble": {"js": "", "css": ""}, "rulesets": {}, "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"description": "

Calculate the hypotenuse of a right triangle, given the other two side lengths.

", "licence": "None specified"}, "name": "Pythagorean Theorem", "ungrouped_variables": ["x"], "variable_groups": [{"name": "Unnamed group", "variables": ["y"]}], "extensions": [], "advice": "

You can use the Pythagorean Theorum to solve this question.

", "type": "question", "contributors": [{"name": "Caroline Ferguson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3283/"}]}]}], "contributors": [{"name": "Caroline Ferguson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3283/"}]}