// Numbas version: exam_results_page_options {"name": "Input 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "name": "Input 2", "tags": ["Fractions", "Numbas", "decimals", "fractions", "input", "introduction", "numbas", "numbers", "tolerance", "whole numbers"], "advice": "

No advice available.

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

Whole numbers

\n

This is an example of a randomised question - the next time you use this example you will be asked to do a different calculation.

\n

Find the result of this calculation: 

\n

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

\n

You must input a whole number; for example, if the answer were $2$ then you could input 2 or 2.0 - try both forms.

", "gaps": [{"minvalue": "a*b+c", "type": "numberentry", "maxvalue": "a*b+c", "marks": 1.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}, {"prompt": "

Sometimes I could force you to enter a whole number not in decimal form. But this should be no problem as you will be warned.

\n

Enter the result of this calculation, but do not enter it as a decimal.

\n

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

\n

Enter the correct answer as a decimal, i.e. in the form 2.0, and see what happens.

", "gaps": [{"notallowed": {"message": "

Do not enter your answer as a decimal. Enter as a whole number without the decimal point.

", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "showpreview": true, "vsetrangepoints": 5.0, "checkingtype": "absdiff", "marks": 1.0, "answer": "{a*b+c}", "checkvariablenames": false, "type": "jme"}], "type": "gapfill", "marks": 0.0}, {"prompt": "

Decimals

\n

Many calculations will result in numbers which must be entered in decimal notation.

\n

I will always ask for the decimal to be input to 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. 

\n

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 putting in 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 decimal 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 input.

", "gaps": [{"minvalue": "{ans1-tol}", "type": "numberentry", "maxvalue": "{ans1+tol}", "marks": 1.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}, {"prompt": "

Fractions

\n

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

\n

For example: 

\n

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

You input the answer as {a1+b1}/{a1*b1}.

\n

Try inputting the decimal version of this to as many places as you like, and see what happens.

", "gaps": [{"notallowed": {"message": "

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

", "showstrings": false, "strings": ["+", "."], "partialcredit": 0.0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "showpreview": true, "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "all, fractionNumbers", "marks": 1.0, "answer": "{a1+b1}/{a1*b1}", "checkvariablenames": false, "type": "jme", "musthave": {"message": "

Input as a fraction.

", "showstrings": false, "strings": ["/"], "partialcredit": 0.0}}], "type": "gapfill", "marks": 0.0}, {"prompt": "

As this question is in practice mode, if you click on the Reveal answers button at the bottom of the screen all 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.

", "type": "information", "marks": 0.0}], "extensions": [], "statement": "

In this example we show how to enter numbers, either as whole numbers (integers), decimals (rounded to a number of decimal places), or fractions.

", "variable_groups": [], "progress": "in-progress", "type": "question", "variables": {"a": {"definition": "random(1..9)", "name": "a"}, "c": {"definition": "random(2..9)", "name": "c"}, "b": {"definition": "random(3..9)", "name": "b"}, "ans1": {"definition": "precround(a1/b1,2)", "name": "ans1"}, "a1": {"definition": "random(2,3,4,5,6,8,9,10,12)", "name": "a1"}, "b1": {"definition": "random(7,11,13)", "name": "b1"}, "tol": {"definition": 0.01, "name": "tol"}}, "metadata": {"notes": "", "description": "

Details on inputting numbers into Numbas.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}