// Numbas version: finer_feedback_settings {"name": "Determining the resulting sign of an arithmetic operation", "extensions": [], "custom_part_types": [], "resources": [["question-resources/drawingresize_grbP9s8.svg", "/srv/numbas/media/question-resources/drawingresize_grbP9s8.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": [], "variable_groups": [], "name": "Determining the resulting sign of an arithmetic operation", "functions": {}, "rulesets": {}, "ungrouped_variables": ["dec", "neg", "pos"], "metadata": {"description": "

Given an equation with an unknown, determine if the unknown is positive or negative.

\n

First part is the product of two numbers; second part is the product of three.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "advice": "

The following rules apply to multiplication and division.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
First signoperationSecond signResulting signExample
$+$$\\times$ or $\\div$$+$$+$$3 \\times 2 = 6$
$+$$\\times$ or $\\div$$-$$-$$3 \\times (-2) = -6$
$-$$\\times$ or $\\div$$+$$-$$(-3) \\times 2 = -6$
$-$$\\times$ or $\\div$$-$$+$$(-3) \\times (-2) = 6$
\n

a)

\n

$(\\var{neg[4]}) \\times (\\var{neg[5]})$ will be positive, as negative times negative gives us positive.

\n

b)

\n

$\\var{pos[4]} \\times (\\var{neg[6]}) \\times \\var{dec[5]}$ will be negative, as positive times negative times positive gives us negative.

\n

To check these:

\n

\\[\\begin{align} a &=(\\var{neg[4]}) \\times (\\var{neg[5]}) \\\\&= + \\var{neg[4]*neg[5]} \\text{ (positive),} \\\\ b &= \\var{pos[4]} \\times (\\var{neg[6]}) \\times \\var{dec[5]} \\\\&= \\var{pos[4]*neg[6]*dec[5]} \\text{ (negative).} \\end{align} \\]

", "statement": "

Decide whether each of the following numbers is positive or negative.

", "preamble": {"js": "", "css": ""}, "variables": {"pos": {"name": "pos", "description": "

Random positive integers.

", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(1..300),5)"}, "dec": {"name": "dec", "description": "

Random decimals.

", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(0..50 #0.01 except 0..50), 7)"}, "neg": {"name": "neg", "description": "

Random negative integers.

", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(-300..-1),8)"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "

$a = (\\var{neg[4]}) \\times (\\var{neg[5]})$ [[0]]

", "gaps": [{"variableReplacementStrategy": "originalfirst", "choices": ["

$a$ is positive

", "

$a$ is negative

"], "matrix": ["1", 0], "maxMarks": 0, "shuffleChoices": false, "variableReplacements": [], "type": "1_n_2", "displayColumns": 0, "marks": 0, "minMarks": 0, "displayType": "radiogroup", "showFeedbackIcon": true, "showCorrectAnswer": true, "distractors": ["", ""], "scripts": {}}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "prompt": "

$b = \\var{pos[4]} \\times (\\var{neg[6]}) \\times \\var{dec[5]}$ [[0]]

\n

", "gaps": [{"variableReplacementStrategy": "originalfirst", "choices": ["

$b$ is positive

", "

$b$ is negative

"], "matrix": [0, "1"], "maxMarks": 0, "shuffleChoices": false, "variableReplacements": [], "type": "1_n_2", "displayColumns": 0, "marks": 0, "minMarks": 0, "displayType": "radiogroup", "showFeedbackIcon": true, "showCorrectAnswer": true, "distractors": ["", ""], "scripts": {}}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}], "tags": ["multiplication", "taxonomy"], "variablesTest": {"maxRuns": "100", "condition": ""}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}]}