Solution (source code)

= Solution

<Euler's formula> for a connected plane graph is $|V|-|E|+|F|=2$. If the graph is triangle-free, every face has boundary length at least four, so
$$
2|E|\geq4|F|.
$$
Euler's formula then gives $|E|\leq2|V|-4$, so the average degree is less than four. There is a vertex of degree at most three. Delete it, color the remaining graph inductively with four colors, and restore it using a color absent from its at most three neighbors. Thus
$$
\boxed{\chi(G)\leq4}.
$$