// Numbas version: exam_results_page_options {"name": "Product rule for counting", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["num_cards", "num_boys", "num_girls", "boy_girl_orderings", "card_giving_ways"], "name": "Product rule for counting", "tags": [], "preamble": {"css": ".list-order {\n display:inline-block;\n list-style:none;\n padding: 1em;\n margin: 0 1em;\n border: 1px solid;\n}", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

Marie has {num_cards} cards.

\n

Each card has a different symbol on it.

\n

Marie gives one card to Shelley and one card to Pauline.

\n

In how many different ways can Marie do this?

", "allowFractions": false, "variableReplacements": [], "maxValue": "card_giving_ways", "minValue": "card_giving_ways", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}, {"prompt": "

There are {num_boys} boys and {num_girls} girls in David's class.

\n

David is going to pick three different students from his class and write their names in a list in order.

\n

The order will be

\n\n

or

\n\n

How many different lists can David write?

", "allowFractions": false, "variableReplacements": [], "maxValue": "boy_girl_orderings", "minValue": "boy_girl_orderings", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}], "extensions": [], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"card_giving_ways": {"definition": "num_cards*(num_cards-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "card_giving_ways", "description": "

Number of ways of giving one card to each of two people.

"}, "num_girls": {"definition": "random(10..20 except num_boys)", "templateType": "anything", "group": "Ungrouped variables", "name": "num_girls", "description": ""}, "num_cards": {"definition": "random(10..52#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "num_cards", "description": ""}, "num_boys": {"definition": "random(10..20#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "num_boys", "description": ""}, "boy_girl_orderings": {"definition": "num_boys*(num_boys-1)*num_girls \n+ \nnum_girls*(num_girls-1)*num_boys", "templateType": "anything", "group": "Ungrouped variables", "name": "boy_girl_orderings", "description": "

Number of ways of writing a list boy-girl-boy or girl-boy-girl.

"}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "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/"}]}