// Numbas version: exam_results_page_options {"name": "Converting units of height (feet/inches/cm)", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"showfrontpage": false, "allowregen": true, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["person", "inches", "inchfeet", "cm", "s"], "variable_groups": [], "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/", "name": "Chris Graham"}], "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
", "name": "Converting units of height (feet/inches/cm)", "preamble": {"js": "", "css": ""}, "variables": {"s": {"definition": "if(person['gender']='neutral','','s')", "name": "s", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "person": {"definition": "random_person()", "name": "person", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "cm": {"definition": "precround((inchfeet*2.54),0)", "name": "cm", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "inches": {"definition": "random(4..11)", "name": "inches", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "inchfeet": {"definition": "(5*12)+inches", "name": "inchfeet", "description": "", "templateType": "anything", "group": "Ungrouped variables"}}, "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", "tags": ["taxonomy"], "extensions": ["random_person"], "variablesTest": {"condition": "", "maxRuns": "1000"}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "functions": {}, "rulesets": {}, "type": "question", "parts": [{"gaps": [{"scripts": {}, "minValue": "cm", "maxValue": "cm", "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "marks": "2", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "variableReplacements": [], "allowFractions": false, "type": "numberentry"}], "steps": [{"minValue": "60", "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?

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

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

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

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

", "showFeedbackIcon": true, "showCorrectAnswer": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "type": "information", "scripts": {}}], "stepsPenalty": 0, "marks": 0, "prompt": "

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

\n

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

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

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

\n

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

\n

", "showFeedbackIcon": true, "showCorrectAnswer": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}}]}]}], "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/", "name": "Chris Graham"}]}