Final answer:
There are 1008 different four-digit alarm codes that can be formed for a house alarm.
Step-by-step explanation:
The total number of different four-digit alarm codes that can be formed for a house alarm can be found by considering the restrictions given in the question. Since the first digit must be 7 or 9, there are 2 options for the first digit. For the remaining three digits, any number from 0 to 9 can be chosen, excluding the already chosen digits. Therefore, there are 9 options for the second digit, 8 options for the third digit, and 7 options for the fourth digit.
Using the multiplication principle, the total number of four-digit alarm codes is calculated as:
2 * 9 * 8 * 7 = 1008.
Therefore, there are 1008 different four-digit alarm codes that can be formed for the house alarm.