The empirical formula of a hydrocarbon containing 0.12 mole of carbon 0.3 mole of hydrogen…