12. In a game activity of a TV entertainment program, each person needs to complete three tasks $A, B, C$. It is known that the probabilities for contestant A to complete tasks $A, B, C$ are $\frac{3}{4}, \frac{3}{4}, \frac{2}{3}$, respectively, and each task is independent.
(1) Contestant A attempts tasks $A, B, C$ once each. Find the probability that A completes at least one task;
(2) The activity requires tasks $A, B$ to be done twice each, and task $C$ to be done three times. If both attempts of task $A$ are successful, then task $B$ is attempted and the contestant earns $a$ points. If both attempts of task $B$ are successful, then task $C$ is attempted and the contestant earns $3a$ points. If at least two out of three attempts of task $C$ are successful, the contestant is considered successful and earns $6a$ points (points are not cumulative), and each task is independent. Let $X$ represent the number of points contestant A earns. Write the distribution of $X$ and find its expected value.
(1) Let $D=$ “A completes at least one project”, then $P(\bar{D})=\frac{1}{4} \times \frac{1}{4} \times \frac{1}{3}=\frac{1}{48}$,

so $P(D)=1-P(\bar{D})=\frac{47}{48}$.
(2) $X=0, a, 3 a, 6 a$, and $P(X=0)=1-\left(\frac{3}{4}\right)^{2}=\frac{7}{16}$,
$$
\begin{array}{l}
P(X=a)=\frac{9}{16} \times\left[1-\left(\frac{3}{4}\right)^{2}\right]=\frac{9}{16} \times \frac{7}{16}=\frac{63}{256}, \\
P(X=3 a)=\left(\frac{9}{16}\right)^{2}\left[C_{3}^{0} \cdot\left(\frac{1}{3}\right)^{3}+C_{3}^{1} \cdot \frac{2}{3} \cdot\left(\frac{1}{3}\right)^{2}\right]=\frac{21}{256}, \\
P(X=6 a)=\left(\frac{9}{16}\right)^{2}\left[C_{3}^{2} \cdot \frac{1}{3} \cdot\left(\frac{2}{3}\right)^{2}+C_{3}^{3} \cdot\left(\frac{2}{3}\right)^{3}\right]=\frac{15}{64},
\end{array}
$$
The distribution of $X$ is as follows:
\begin{tabular}{|c|c|c|c|c|}
\hline$X$ & 0 & $a$ & $3 a$ & $6 a$ \\
\hline$P$ & $\frac{7}{16}$ & $\frac{63}{256}$ & $\frac{21}{256}$ & $\frac{15}{64}$ \\
\hline
\end{tabular}
The expected value of $X$ is $E X=\frac{63 a}{256}+\frac{63 a}{256}+\frac{90 a}{64}=\frac{243 a}{128}$.