// Numbas version: finer_feedback_settings {"name": "David's copy of Converting units of height (feet/inches/cm)", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "variablesTest": {"maxRuns": "1000", "condition": ""}, "tags": ["taxonomy"], "ungrouped_variables": ["person", "inches", "inchfeet", "cm", "s"], "advice": "

\n

\n

{person['name']} is $5$ft $\\var{inches}$ inches tall.

\n

a)

\n

To find {person['name']}'s height into cm, we first convert it into inches. 

\n

We can convert feet into inches by multiplying by $12$. So $5$ feet is

\n

\\[ 5\\times12=60 \\text{ inches.}\\]

\n

Therefore $5$ft $\\var{inches}$ inches is 

\n

\\[
60+\\var{inches} = \\var{60+inches}\\text{ inches.}
\\]

\n

We can now convert this to cm by multiplying by $2.54$.

\n

\\[\\var{60+inches}\\times2.54=\\var{cm}\\text{ cm, rounded to the nearest integer.}\\]

\n

b)

\n

To convert centimetres into metres, we divide by $100$:

\n

\\[\\var{cm}\\div100=\\var{dpformat(cm/100,2)} \\text{ metres.}\\]

\n

Therefore, {person['name']} is $\\var{dpformat(cm/100,2)}$ metres tall. 

\n

\n

", "extensions": ["random_person"], "variable_groups": [], "variables": {"person": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random_person()", "name": "person"}, "inches": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(4..11)", "name": "inches"}, "cm": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "precround((inchfeet*2.54),0)", "name": "cm"}, "s": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "if(person['gender']='neutral','','s')", "name": "s"}, "inchfeet": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "(5*12)+inches", "name": "inchfeet"}}, "rulesets": {}, "name": "David's copy of Converting units of height (feet/inches/cm)", "parts": [{"marks": 0, "stepsPenalty": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "steps": [{"scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "minValue": "60", "showFeedbackIcon": true, "prompt": "

We have information on how to convert feet to inches and inches to cm, but not feet to cm. We will therefore first convert the height into inches only.

\n

What is $5$ft in inches?

", "marks": "0.5", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacements": [], "allowFractions": false, "maxValue": "60", "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}, {"scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "minValue": "60+inches", "showFeedbackIcon": true, "prompt": "

What is {person['name']}'s height in inches?

", "marks": "0.5", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacements": [], "allowFractions": false, "maxValue": "60+inches", "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}, {"marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "type": "information", "variableReplacementStrategy": "originalfirst", "prompt": "

We can now use the conversion rate for inches to cm to find {person['name']}'s height in cm.

"}], "gaps": [{"scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "minValue": "cm", "showFeedbackIcon": true, "marks": "2", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacements": [], "allowFractions": false, "maxValue": "cm", "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "prompt": "

What is {person['name']}'s height in centimetres? 

\n

[[0]]cm      round your answer to the nearest cm

"}, {"marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "type": "gapfill", "gaps": [{"scripts": {}, "strictPrecision": false, "precisionPartialCredit": 0, "mustBeReduced": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "minValue": "cm/100", "showFeedbackIcon": true, "precision": "2", "marks": 1, "precisionType": "dp", "mustBeReducedPC": 0, "showCorrectAnswer": true, "precisionMessage": "You have not given your answer to the correct precision.", "type": "numberentry", "variableReplacements": [], "allowFractions": false, "maxValue": "cm/100", "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}], "variableReplacementStrategy": "originalfirst", "prompt": "

What is {person['name']}'s height in metres?

\n

[[0]]m        round your answer to 2 decimal places

\n

"}], "functions": {}, "statement": "

{person['name']} is $5$ft $\\var{inches}$ inches tall and would like to find {person['pronouns']['their']} height in cm.

\n

{capitalise(person['pronouns']['they'])} find{s} the following unit conversion table:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$1$ foot$12$ inches
$1$ inch$2.54$ cm
$1$ metre$100$ cm
", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Convert a height given in feet and inches into cm and then metres.

"}, "type": "question", "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "David Rickard", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/451/"}]}]}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "David Rickard", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/451/"}]}