How to create CFG for $L := \{x| \#_0(x) \text{ is even and } \#_1(x) \text{ is odd}\}$
Let us define 4 non-terminals $X_{00}, X_{01}, X_{10}, X_{11}$ and the start variable $S$. The rules are as follow:
\begin{align}
S &amp;\rightarrow X_{00},\\
X_{01}&amp;\rightarrow \epsilon,\\
X_{00}&amp;\rightarrow 0X_{10},\\
X_{00}&amp;\rightarrow 1X_{10},\\
X_{01}&amp;\rightarrow 0X_{11},\\
X_{01}&amp;\rightarrow 1X_{00},\\
X_{10}&amp;\rightarrow 0X_{00},\\
X_{10}&amp;\rightarrow 1X_{11},\\
X_{11}&amp;\rightarrow 0X_{01},\\
X_{11}&amp;\rightarrow 1X_{10},\\
\end{align}
where the first index tells the parity of the number of zeros and the second one the parity of the count of ones.

Try to prove the correctness as an exercise.