The door code to get into a top-secret laboratory is 6 digits. The first 3 digits of the code are all odd and the last 3 digits are all even. Digits can be used more than once. How many possible codes are there to gain access to this laboratory?

1 Answer

#15,625#

Explanation:

Let's work this out first looking at the first three digits of the code, which are all odd and can be used more than once.

First three numbers

There are five odd numbers: 1, 3, 5, 7, 9.

Let's look at the first number in the code - it can be any one of five numbers, so we have 5 choices.

The next number in the code has the same number of choices, so we have 5 choices.

And the same goes for the last number, with 5 choices.

Put together, we have #5xx5xx5=125#

Last three numbers

There are also five even numbers: 0, 2, 4, 6, 8

This means we'll also have 125 ways to arrange the even numbers.

Putting it together

That's 125 ways in the first set of three and 125 in the second set of three, and so it's #125xx125=15625#

As an aside, we could have looked at each digit in the code, seen there were 5 choices for each digit, and so calculated #5^6=15625#