You will write four functions for a hydrogen-oxygen fuel cell. One finds the oxygen that is used, one the water that forms, one the volume of the hydrogen, and one checks that the masses balance.
The idea. The equation is . Two moles of hydrogen use one mole of oxygen and form two moles of water. The molar masses are for hydrogen, for oxygen and for water. One mole of gas fills at room temperature and pressure.
Your tasks.
oxygen_used(mass_h2) in grams.water_formed(mass_h2) in grams.hydrogen_volume(mass_h2) in dm³.balances(mass_h2). It returns True if the mass of hydrogen plus the mass of oxygen equals the mass of water.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…