// Numbas version: exam_results_page_options {"name": "How to enter numbers - Getting Started", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "parts": [{"variableReplacementStrategy": "originalfirst", "marks": 0, "unitTests": [], "prompt": "

Find the result of this calculation: (This is an example of a randomised question - the next time you use this example you will probably be given a different calculation to do):

\n

$\\var{a}\\times\\var{b}+\\var{c}=\\;$[[0]]

\n

You have to input a whole number - it could be in decimal form. If the answer was $2$ then you could input 2 or 2.0 - try both forms.

", "showCorrectAnswer": true, "sortAnswers": false, "gaps": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 1, "unitTests": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true, "correctAnswerFraction": false, "minValue": "a*b+c", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "type": "numberentry", "maxValue": "a*b+c", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "variableReplacements": [], "mustBeReduced": false}], "extendBaseMarkingAlgorithm": true, "type": "gapfill", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": [], "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "marks": 0, "unitTests": [], "prompt": "

Decimals

\n

Many calculations will result in numbers which need to be entered in decimal notation, and the question will ask for a certain number of decimal places. 

\n

Often there is a small tolerance built in so that if you get the result wrong by 1 in the last decimal place then it will be marked as correct. But accuracy is important, so make sure that you get the calculations correct.

\n

For example: 

\n

Input $\\displaystyle \\frac{\\var{a1}}{\\var{b1}}$ as a decimal correct to 2 decimal places here: [[0]]

\n

Try entering the correct value and submitting. Then vary the last decimal place by 1 either way and submitting, and then the last place by 2 either way and submitting.

\n

Try putting in the fraction as it is (i.e. $\\var{a1}/\\var{b1}$ ) and see what happens. 

\n

The system gives an error message as what you have put in is not a direct representation of a number. But you can always re-enter.

\n

So be careful - always check after submitting your answer that the input field contains the answer that you thought you entered.

", "showCorrectAnswer": true, "sortAnswers": false, "gaps": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 1, "unitTests": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true, "correctAnswerFraction": false, "minValue": "{ans1-tol}", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "type": "numberentry", "maxValue": "{ans1+tol}", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "variableReplacements": [], "mustBeReduced": false}], "extendBaseMarkingAlgorithm": true, "type": "gapfill", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": [], "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "marks": 0, "unitTests": [], "prompt": "

Fractions

\n

You will find that some questions may ask you to input fractions and not decimals.

\n

For example, find the following sum as a fraction:

\n

$\\displaystyle \\frac{1}{\\var{a1}}+\\frac{1}{\\var{b1}}=\\;$[[0]]

\n

(input as a fraction and not a decimal)

\n

Hint: the answer is {a1+b1}/{a1*b1}

\n

Try inputting the decimal version of this to as many places as you like (for example given by the calculator on the PC - you can copy this from the calculator and paste into the input field) and see what happens.

", "showCorrectAnswer": true, "sortAnswers": false, "gaps": [{"variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "answerSimplification": "all, fractionNumbers", "notallowed": {"showStrings": false, "message": "

Simplify into a single fraction. Do not enter as a decimal.

", "partialCredit": 0, "strings": ["+", "."]}, "checkingType": "absdiff", "type": "jme", "musthave": {"showStrings": false, "message": "

Input as a fraction.

", "partialCredit": 0, "strings": ["/"]}, "variableReplacements": [], "scripts": {}, "checkVariableNames": false, "failureRate": 1, "marks": 1, "unitTests": [], "answer": "{a1+b1}/{a1*b1}", "showCorrectAnswer": true, "vsetRangePoints": 5, "checkingAccuracy": 0.001, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showPreview": true}], "extendBaseMarkingAlgorithm": true, "type": "gapfill", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": [], "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "marks": 0, "customMarkingAlgorithm": "", "type": "information", "showFeedbackIcon": true, "prompt": "

As this question is in practice mode, if you click on the Reveal answers button all of the question fields are filled with the correct answers. Also, if available, there will be a full solution given under the heading Advice. Just scroll down to see this. However, there is no advice available for this question as it is not needed.

\n

Finally as you are in practice mode, if you click on the Try another question like this one button at the bottom you will get this question again but with different numbers (usually!), and you can try it again. This is true for all practice mode questions which are randomised.

", "unitTests": [], "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "scripts": {}}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Details on inputting numbers into Numbas.

"}, "tags": ["checked2015", "Decimals", "decimals", "Fractions", "fractions", "input", "introduction", "numbas", "Numbas", "numbers", "tolerance", "whole numbers"], "ungrouped_variables": ["a", "c", "b", "ans1", "a1", "b1", "tol"], "statement": "

In this example we show how to enter numbers, either as 

\n
    \n
  1. Whole numbers (integers).
  2. \n
  3. Decimals (to a number of decimal places)
  4. \n
  5. Fractions
  6. \n
", "functions": {}, "preamble": {"css": "", "js": ""}, "variables": {"a1": {"group": "Ungrouped variables", "description": "", "definition": "random(2,3,4,5,6,8,9,10,12)", "name": "a1", "templateType": "anything"}, "tol": {"group": "Ungrouped variables", "description": "", "definition": "0.01", "name": "tol", "templateType": "anything"}, "b": {"group": "Ungrouped variables", "description": "", "definition": "random(3..9)", "name": "b", "templateType": "anything"}, "c": {"group": "Ungrouped variables", "description": "", "definition": "random(2..9)", "name": "c", "templateType": "anything"}, "ans1": {"group": "Ungrouped variables", "description": "", "definition": "precround(a1/b1,2)", "name": "ans1", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "description": "", "definition": "random(1..9)", "name": "a", "templateType": "anything"}, "b1": {"group": "Ungrouped variables", "description": "", "definition": "random(7,11,13)", "name": "b1", "templateType": "anything"}}, "advice": "

No advice available.

", "type": "question", "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "extensions": [], "name": "How to enter numbers - Getting Started", "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}