A password can be any 4 digit {0…9}.
1.)How many possible passwords are there?
for this I did $10^4 = 10,000$
2.) How many possible passwords with no repeated digits?
$10*9*8*7 = 5040$
3.) How many possible passwords are there with repeated digits?
For this do I just subtract 10,000-5040?
Edit: typos. Thanks everyone.
Best Answer
community wiki answer so the question can be closed
Your solutions to the first two questions are correct.
Yes, to find the number of passwords with repeated digits, you subtract the number of passwords with no repeated digits from the total, so there are $10000 - 5040 = 4960$, as you found.