Question 327122
If repetition is allowed, then there are 6 choices for the first, 6 for the second, and so on.

Thus, there are 6^5=7776 possible codes when repetition IS allowed.

If not allowed, then there are 6 for the first, 5 for the second, and so on.

Thus, there are 6!=720 different codes when repetition IS NOT allowed.