Using the standard 10 digit keypad, we first have two questions to consider?
Does the order in which the digits are entered matter?
Can you reuse a digit more than once?
For the ipad, if the order does matter and you cannot reuse digits, the number of possible codes can be determined by considering each digit as a separate event with four such events in succession providing the right code. By successively applying the multiplication principle, you find that the number of possible codes is the number of remaining available digits at each step. Namely, \(10 \times 9 \times 8 \times 7 = 5040.\)