You will write three small functions for an ideal gas. Each one uses in SI units.
The idea. Pressure in pascal, volume in cubic metres, temperature in kelvin and J/(mol K). For a fixed amount of gas, .
Your tasks.
pressure, return the pressure in Pa of n moles in a volume V in m³ at a temperature T in K.new_volume, a fixed amount of gas goes from (p1, V1, T1) to a new pressure p2 and temperature T2. Return the new volume.density, return the density in kg/m³ of a gas of molar mass M in kg/mol.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…