Input Parameters: ----------------- molar_mass_1: Molar mass of the first gas (g/mol, kg/kmol, etc.) molar_mass_2: Molar mass of the second gas (g/mol, kg/kmol, etc.) Returns: -------- >>> effusion_ratio(2.016, 4.002) 1.408943 >>> effusion_ratio(-2.016, 4.002)
(molar_mass_1: float, molar_mass_2: float)
| 40 | |
| 41 | |
| 42 | def effusion_ratio(molar_mass_1: float, molar_mass_2: float) -> float | ValueError: |
| 43 | """ |
| 44 | Input Parameters: |
| 45 | ----------------- |
| 46 | molar_mass_1: Molar mass of the first gas (g/mol, kg/kmol, etc.) |
| 47 | molar_mass_2: Molar mass of the second gas (g/mol, kg/kmol, etc.) |
| 48 | |
| 49 | Returns: |
| 50 | -------- |
| 51 | >>> effusion_ratio(2.016, 4.002) |
| 52 | 1.408943 |
| 53 | >>> effusion_ratio(-2.016, 4.002) |
| 54 | ValueError('Input Error: Molar mass values must greater than 0.') |
| 55 | >>> effusion_ratio(2.016) |
| 56 | Traceback (most recent call last): |
| 57 | ... |
| 58 | TypeError: effusion_ratio() missing 1 required positional argument: 'molar_mass_2' |
| 59 | """ |
| 60 | return ( |
| 61 | round(sqrt(molar_mass_2 / molar_mass_1), 6) |
| 62 | if validate(molar_mass_1, molar_mass_2) |
| 63 | else ValueError("Input Error: Molar mass values must greater than 0.") |
| 64 | ) |
| 65 | |
| 66 | |
| 67 | def first_effusion_rate( |
nothing calls this directly
no test coverage detected