The choice of article (a or an) depends on the sound of the first letter in a word, not always on how it is written.
An is used with words that start with a vowel sound (a, e, i, o, u), the rest are used with a.
Complete the following exchanges with a or an: