5. Here you have 4 choices to make: one's digit, ten's digit, hundred's digit and thousand's digit. However, since the final number must not be divisible by 5, the one's position cannot contain a 5. Think of having four positions and write down the number of possible ways in which to fill each position.