You will write functions for the complete combustion of an alkane. One finds the relative formula mass of the alkane. One finds the mass of carbon dioxide. One finds the volume of oxygen at room temperature and pressure. One checks that the atoms balance.
The idea. The alkane has . One mole gives moles of carbon dioxide, with a molar mass of . It needs moles of oxygen. One mole of any gas fills at r.t.p. For one molecule, the atoms of carbon, hydrogen and oxygen must be equal on the two sides of the equation.
Your tasks.
alkane_mr(n).co2_mass(mass, n).oxygen_volume(mass, n).atoms_balance(n, o2, co2, h2o) so that it returns True when one alkane molecule and o2 oxygen molecules give co2 and h2o molecules with the same atoms on both sides.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…