// Numbas version: finer_feedback_settings {"name": "BODMAS: Percentages", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "b", "mint", "chocolate", "sweets", "num", "den", "n", "d", "per", "marks", "increase", "new_mark", "decimal", "gcd_per100", "numerator", "denominator", "marks_increased", "p", "dec"], "name": "BODMAS: Percentages", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

Questions of the form \"find $\\var{a}\\%$ of $\\var{b}$\". 

\n

In order to answer this you multiply the number, $\\var{b}$, by the percentage over 100, $\\dfrac{\\var{a}}{100}$

\n

$\\var{b} \\times \\dfrac{\\var{a}}{100} = \\simplify{{a}*{b}/100}$

\n

Remember: Give you answer to 2 decimal places.

\n

\n

\n

Questions of the form \"if a mixed bag of $\\var{sweets}$ sweets contains $\\var{mint}$ mints and $\\var{chocolate}$ chocolates. What percentage of the contents is chocolate\"

\n

To calculate the percentage of chocolate sweets in the bag you must divide the number of chocolates by the total number of sweets and then multiply by $100%$.

\n

$\\dfrac{\\var{chocolate}}{\\var{sweets}}\\times 100 = \\simplify{100*{chocolate}/{sweets}}.

\n

Remember: Give you answer to 2 decimal places.

\n

\n

\n

Questions of the form \"convert $\\dfrac{\\var{num}}{\\var{den}}$ into a percentage\"

\n

This question is very similar to part b). We already have the number in fractional form if we covert this into a decimal and multiply by $100\\%$ we obtain the percentage

\n

$\\dfrac{\\var{num}}{\\var{den}} = \\var{deciamal}\\times 100\\% = \\simplify{{decimal}*100}\\%$

\n

Remember: Give you answer to 2 decimal places.

\n

\n

\n

Questions of the form \"convert $\\var{per}\\%$ into a fraction\"

\n

To do this you simply divide by $100$.

\n

$\\var{per}\\% = \\dfrac{\\var{per}}{100} = \\dfrac{\\var{numerator}}{\\var{denominator}}$ 

\n

\n

\n

Questions of the form \"Last year the average mark in an exam was $\\var{marks}$. They have now increased by $\\var{increase}$ percent. What is the current average mark?\"

\n

We start by finding $\\var{increase}$ % of $\\var{marks}$.

\n

$\\var{marks}\\times\\dfrac{\\var{increase}}{100} = \\var{marks_increased}$

\n

We then add this onto last years average marks to find this years

\n

$\\var{marks} + \\var{marks_increased} = \\var{new_mark}$

", "rulesets": {}, "parts": [{"prompt": "

Find $\\var{a}\\%$ of $\\var{b}$

\n

Answer:   [[0]]  (2.d.p)

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "

You have not given your answer to the correct number of decimal places.

", "allowFractions": false, "marks": 1, "precision": "2", "maxValue": "(a/100)*b", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": "50", "scripts": {}, "minValue": "(a/100)*b", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

If a mixed bag of $\\var{sweets}$ sweets contains $\\var{mint}$ mints and $\\var{chocolate}$ chocolates. What percentage of the contents is chocolate?

\n

\n

Answer:  [[0]] %(2.dp)

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "marks": 1, "precision": "2", "maxValue": "(chocolate/sweets)*100", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": "50", "scripts": {}, "minValue": "(chocolate/sweets)*100", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Convert $\\dfrac{\\var{num}}{\\var{den}}$ into a percentage.

\n

Answer: [[0]] % (2dp)

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "

You have not given your answer to the correct number of decimal places.

", "allowFractions": false, "marks": 1, "precision": "2", "maxValue": "(num/den)*100", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": "50", "scripts": {}, "minValue": "(num/den)*100", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Convert $\\var{per}\\%$ into a fraction. Fraction must be in it's simplest form.

\n

Answer: [[0]] /[[1]]

", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "numerator", "minValue": "numerator", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "denominator", "minValue": "denominator", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Last year the average mark in an exam was $\\var{marks}$. They have now increased by $\\var{increase}$ percent. What is the current average mark?

\n

Answer: [[0]]

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "marks": 1, "precision": "2", "maxValue": "new_mark", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": "50", "scripts": {}, "minValue": "new_mark", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Write $\\var{p}$ as a decimal?

\n

Answer:  [[0]] (2 d.p.)

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "

You have not given your answer to the correct precision. Please give your answer to 2 decimal places.

", "allowFractions": false, "marks": 1, "precision": "2", "maxValue": "dec", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": "50", "scripts": {}, "minValue": "dec", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "

Answer the following questions on percentages.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(1..20)*5", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "random(1..30)*10", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "random(n+1..20)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "p": {"definition": "random(1..99)", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "marks_increased": {"definition": "marks*increase/100", "templateType": "anything", "group": "Ungrouped variables", "name": "marks_increased", "description": ""}, "new_mark": {"definition": "marks*(1+(increase/100))", "templateType": "anything", "group": "Ungrouped variables", "name": "new_mark", "description": ""}, "denominator": {"definition": "100/gcd_per100", "templateType": "anything", "group": "Ungrouped variables", "name": "denominator", "description": ""}, "numerator": {"definition": "per/gcd_per100", "templateType": "anything", "group": "Ungrouped variables", "name": "numerator", "description": ""}, "per": {"definition": "precround(100*n/d,0)", "templateType": "anything", "group": "Ungrouped variables", "name": "per", "description": ""}, "chocolate": {"definition": "sweets - mint", "templateType": "anything", "group": "Ungrouped variables", "name": "chocolate", "description": ""}, "increase": {"definition": "random(1..40)", "templateType": "anything", "group": "Ungrouped variables", "name": "increase", "description": ""}, "sweets": {"definition": "random(1..4)*10", "templateType": "anything", "group": "Ungrouped variables", "name": "sweets", "description": ""}, "num": {"definition": "random(1..90)", "templateType": "anything", "group": "Ungrouped variables", "name": "num", "description": ""}, "gcd_per100": {"definition": "gcd(per,100)", "templateType": "anything", "group": "Ungrouped variables", "name": "gcd_per100", "description": ""}, "den": {"definition": "random(num..99 except num)", "templateType": "anything", "group": "Ungrouped variables", "name": "den", "description": ""}, "marks": {"definition": "random(40..100)", "templateType": "anything", "group": "Ungrouped variables", "name": "marks", "description": ""}, "n": {"definition": "random(1..18)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "dec": {"definition": "p/100", "templateType": "anything", "group": "Ungrouped variables", "name": "dec", "description": ""}, "mint": {"definition": "random(1..sweets)", "templateType": "anything", "group": "Ungrouped variables", "name": "mint", "description": ""}, "decimal": {"definition": "num/den", "templateType": "anything", "group": "Ungrouped variables", "name": "decimal", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}]}]}], "contributors": [{"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}]}