I am reading "General Topology" by Stephen Willard.

I think the following property is necessary for the converse part of Theorem 4.2.
N-z) $\mathcal{U}_x\neq\emptyset$ for any $x\in X$.
I created a python program which computes the number of the functions $\mathcal{U}:X=\{0,1,\dots,n-1\}\to 2^X$ which satisfy N-a) through N-d).
But my python program didn't compute the correct answer.
Am I right?
You are correct. The neighborhood system must be nonempty at each point.
If $\mathcal{U}_x$ was empty for some $x\in X$, it means $x$ does not have any neighborhoods, and consequently by the condition N-e) $x$ can not belong to any open set. Especially this means $X$ is not open, but then ''the result is a topology on $X$'' does not hold.