// Numbas version: exam_results_page_options {"name": "Josh's copy of Julie's copy of Pupil Teacher Ratio randomised", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"preventleave": false, "allowregen": true, "showfrontpage": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["studentrat", "percent"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Simple ratio question with custom marking and partial credit possible

"}, "name": "Josh's copy of Julie's copy of Pupil Teacher Ratio randomised", "statement": "

The ratio of teachers to pupils in a school is 1:{studentrat}

The fraction of the school population that are teachers is $\\frac{1}{1+\\var{studentrat}}$

\n

Convert this to a decimal by multiplying by 100.

\n

$\\frac{1}{\\simplify{1+{studentrat}}}*100=\\var{percent}$

\n

", "type": "question", "variables": {"studentrat": {"group": "Ungrouped variables", "name": "studentrat", "definition": "Random(17..22)", "description": "", "templateType": "anything"}, "percent": {"group": "Ungrouped variables", "name": "percent", "definition": "(1/(studentrat+1))*100", "description": "", "templateType": "anything"}}, "variable_groups": [], "preamble": {"js": "", "css": ""}, "rulesets": {}, "extensions": [], "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "tags": [], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Deirdre Casey", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/681/"}, {"name": "Josh Lim", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2990/"}], "parts": [{"scripts": {}, "unitTests": [], "mustBeReduced": false, "marks": "10", "maxValue": "percent", "customMarkingAlgorithm": "\nmark:\n apply(validNumber);\n if(isFraction,\n apply(cancelled)\n ,\n apply(correctPrecision)\n );\n switch(\n studentNumber=precround(100/(1+studentrat),studentPrecision),set_credit(1,\"Correct Answer, Well Done!\"),\n studentNumber=precround(100/studentrat,studentPrecision),set_credit(0.5,\"Some good work done but not quite there yet. Have a think about your denominator\"),\n studentNumber=precround(1/(1+studentrat),studentPrecision),set_credit(0.7,\"Is your answer a percentage?\"),\n studentNumber=precround((1+studentrat)/100.0,studentPrecision),set_credit(0.3,\"Something worthwhile here but you need to think further\"),\n set_credit(0,\"Incorrect\") \n )", "precisionPartialCredit": 0, "variableReplacementStrategy": "originalfirst", "strictPrecision": false, "prompt": "

What percentage of the school population are teachers?

", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "precision": "2", "variableReplacements": [], "type": "numberentry", "showPrecisionHint": true, "showCorrectAnswer": true, "precisionType": "dp", "minValue": "percent"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Deirdre Casey", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/681/"}, {"name": "Josh Lim", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2990/"}]}