In 100 g of compound there are 47.0 g potassium, 14.5 g carbon, and 38.5 g oxygen. Why?
We divide thru by the atomic masses:
$K$ $=$ $(47.0*g)/(39.1*g*mol^(-1))$ $=$ $1.20$.
$C$ $=$ $(14.5*g)/(12.0*g*mol^(-1))$ $=$ $1.21$.
$O$ $=$ $(38.5*g)/(16.0*g*mol^(-1))$ $=$ $2.4$.
Now if we divide thru by the lowest ratio, we get $K_nC_mO_o$ $=$ $KCO_2$ as the empirical formula.
You have likely got the dipotassium salt of oxalic acid, $HOC(=O)C(=O)OH$, which has precisely this empirical formula. I take it you are an undergraduate?