Learn

There are three types of people, those who can count and those who can’t!

Counting the number of ways to perform a task is simple — until the number of choices gets too large. One fundamental counting principle states that if there are p ways to do one thing, and q ways to do another thing, then there are p * q ways to do both things.

Suppose you have three shirts (let’s call them R, G, and B), and two pairs of jeans (1 and 2). You can wear one of six different outfits: R1, R2, G1, G2, B1, B2.

To ‘count’ the number of possible outfits, multiply the choice of shirts by the choice of jeans. You have 3 * 2 = 6 possible outfits.

Instructions

You are conducting an experiment that involves tossing a coin and then rolling a die. How many possible outcomes can you get?


Tossing a coin can result in one of two outcomes: {Heads, Tails}.

Rolling a die can result in one of six outcomes: {1, 2, 3, 4, 5, 6}.

Use the fundamental counting principle to find the possible outcomes of both combined.

Answer: 2 * 6 = 12

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?