So if the vowel (such as a, e, i, o, u) sounds like 'eu' (e.g. Europe, useful, university etc.) or 'wa' (e.g. one) - they are considered as consonants (such as b, c, d, m, n etc.). So you out 'a' before them - instead of 'an'.
On the other hand, there are few words that start with consonants but sound to start with vowels. So you put 'an' before them. Example: An hour, an honest man etc.
Yeah, these are just exceptions that need to be remembered. :(
"I wear a uniform as a university janitor ".. try saying saying that . Now try changing the "a" for an "an" and repeat the sentence. ...you'll see that the "a" is correct. Why ? Because words such as uniform , university, united, union ....are pronunced as if they begin with a " yoo " sound. unlike , unlikely! An unlikely story but a unique one !
For some reason, Duolingo believes that sentences like this one are very useful (No pun intended). Why not give us examples of more complex sentences, that might, I am resigned to say, include even stories like "He throws a knife )", or "there is a snake in his bed", or " that nasty man in a tub"? The repetitiveness of these simple isolated but nothing to teach you phrases only slows down the progress and delays the entire course of teaching.