A key code must contain 4 numerals. There are 9 numerals available. Using these numerals, how many different key codes may be created?
Assuming that each numeral in the code can be repeated, you would do 9 (9 possible numerals) ^ 4 (4 numerals in a code) to get 6561. That means 6561 codes. On the other hand, if numerals can not be repeated in the code, then you would do 9 (9 possible numerals) * 8 (9-1 numerals used is 8 remaining possible numerals) * 7 (8-1) * 6 (7-1) to get 3024 codes.
Assuming that each numeral in the code can be repeated, you would do 9 (9 possible numerals) ^ 4 (4 numerals in a code) to get 6561. That means 6561 codes. On the other hand, if numerals can not be repeated in the code, then you would do 9 (9 possible numerals) * 8 (9-1 numerals used is 8 remaining possible numerals) * 7 (8-1) * 6 (7-1) to get 3024 codes.