// Numbas version: exam_results_page_options {"name": "Ratios: In Context - Currency conversion", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Ratios: In Context - Currency conversion", "tags": [], "metadata": {"description": "

Given the exchange rate between two currencies, calculate how much of one currency you will get for $x$ amount of the other

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

If the exchange rate between $\\var{chosen_currencyA}$ and $\\var{chosen_currencyB}$ is:

\n

1 $\\var{chosen_currencyA}$ = $\\var{exchange}$ $\\var{chosen_currencyB}$ 

\n

(Round to the nearest cent)

", "advice": "

Remember this is money, so you need two decimal places in every answer.

PART A


\n

To calculate how many $\\var{chosen_currencyB}$ you get for $\\var{numbertwo}$ $\\var{chosen_currencyA}$

\n

$\\var{numbertwo}$ *$ \\var{exchange}$  = $\\var{rounded2}$ $\\var{chosen_currencyB}$

Think: you get more than 1 {chosen_currencyB} for each {chosen_currencyA}, so you will have more {chosen_currencyB} in your answer than {chosen_currencyA} in the question.

PART B


To calculate how many $\\var{chosen_currencyA}$ you will get for  $\\var{numberone}$  $\\var{chosen_currencyB}$ :

\n

$\\frac{\\var{numberone}}{\\var{exchange}}  = \\var{rounded1}$ $\\var{chosen_currencyA}$

Think: you get more than 1 {chosen_currencyB} for each {chosen_currencyA}, so you will have less {chosen_currencyA} in your answer than {chosen_currencyB} in the question.

\n

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"numberone": {"name": "numberone", "group": "Ungrouped variables", "definition": "random(600..800)", "description": "", "templateType": "anything", "can_override": false}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "definition": "({numbertwo)*{exchange}", "description": "", "templateType": "anything", "can_override": false}, "rounded1": {"name": "rounded1", "group": "Ungrouped variables", "definition": "precround(ans1,2)", "description": "", "templateType": "anything", "can_override": false}, "currencyA": {"name": "currencyA", "group": "Ungrouped variables", "definition": "['Euro','Swedish Krona','GBP']", "description": "

list of currencies

", "templateType": "anything", "can_override": false}, "currencyb": {"name": "currencyb", "group": "Ungrouped variables", "definition": "['USD', 'Japanese Yen', 'Australian Dollars']", "description": "", "templateType": "anything", "can_override": false}, "numbertwo": {"name": "numbertwo", "group": "Ungrouped variables", "definition": "random(300..600 except {numberone})", "description": "", "templateType": "anything", "can_override": false}, "exchange_list": {"name": "exchange_list", "group": "Ungrouped variables", "definition": "[random(1.18..1.34 #0.02), random(12.2..15.1#0.5),random(1.65..1.85#0.02)]", "description": "", "templateType": "anything", "can_override": false}, "chosen_currencyb": {"name": "chosen_currencyb", "group": "Ungrouped variables", "definition": "currencyb[index]", "description": "", "templateType": "anything", "can_override": false}, "ans1": {"name": "ans1", "group": "Ungrouped variables", "definition": "({numberone}/{exchange})", "description": "", "templateType": "anything", "can_override": false}, "rounded2": {"name": "rounded2", "group": "Ungrouped variables", "definition": "precround(ans2,2)", "description": "", "templateType": "anything", "can_override": false}, "exchange": {"name": "exchange", "group": "Ungrouped variables", "definition": "exchange_list[index]", "description": "", "templateType": "anything", "can_override": false}, "chosen_currencya": {"name": "chosen_currencya", "group": "Ungrouped variables", "definition": "currencya[index]", "description": "", "templateType": "anything", "can_override": false}, "index": {"name": "index", "group": "Ungrouped variables", "definition": "random(0,1,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["numberone", "numbertwo", "ans1", "ans2", "exchange_list", "currencyA", "chosen_currencya", "index", "currencyb", "chosen_currencyb", "exchange", "rounded1", "rounded2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How many $\\var{chosen_currencyB}$ will I get for $\\var{numbertwo}$ $\\var{chosen_currencyA}$?

\n

[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{ans2}", "maxValue": "{ans2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How many $\\var{chosen_currencyA}$ will I get for $\\var{numberone}$ $\\var{chosen_currencyB}$?

\n

[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{ans1}", "maxValue": "{ans1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "David Goulding", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2365/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "David Goulding", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2365/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}