Context-free grammar for binary words
Hint: A string with exactly one $a$ would look like this:
$$
(any\ number\ of b's)\,a\,(any\ number\ of b's)
$$
and a grammar to generate the language of these strings is $S\rightarrow AaA,\ \  A\rightarrow aA\mid \epsilon$.

Generalize.