"I paint once a year."
Translation:Dw i'n peintio unwaith y flwyddyn.
dw i ... is usual. dwi ... is an informal contraction reflecting the pronunciation.
If you stick with dw i ... in your own practice it may then be easier to remember that dw is a verb (another contraction, as it happens) and i (in this case) is a pronoun.
They're interchangeable (but I've never seen "dwi" used in the emphatic so you might need to use "dw i" there), if you're marked wrong for using one and it is marked incorrect when the other is accepted then please report it.