You will work with a mixture of gases, and then test whether a gas is close to ideal.
The idea. Each gas in a mixture fills the whole volume, so its partial pressure is . The total is the sum. For a real gas, the ratio shows how far it is from ideal.
Your tasks.
partial_pressures, moles is a dictionary such as {"oxygen": 0.2, "helium": 0.8}. Return a dictionary of the partial pressures in Pa.mole_fraction, return the mole fraction of the gas name.ratio, return for a measured pressure p.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…