Answer:
if repetition is allowed,
if repetition is not allowed.
Explanation:
For the first case, we have a choice of 26 letters each step of the way. For each of the 26 letters we can pick for the first slot, we can pick 26 for the second, and for each of those 26, we can pick between 26 again for our third slot, and well, you get the idea. Each step, we're multiplying the number of possible passwords by 26, so for a four-letter password, that comes out to 26 × 26 × 26 × 26 =
possible passwords.
If repetition is not allowed, we're slowly going to deplete our supply of letters. We still get 26 to choose from for the first letter, but once we've picked it, we only have 25 for the second. Once we pick the second, we only have 24 for the third, and so on for the fourth. This gives us instead a pretty generous choice of 26 × 25 × 24 × 23 passwords.