>>> temperature_of_gas_system(2, 100, 5) 30.068090996146232 >>> temperature_of_gas_system(11, 5009, 1000) 54767.66101807144 >>> temperature_of_gas_system(3, -0.46, 23.5) Traceback (most recent call last): ... ValueError: Invalid inputs. Enter positive value.
(moles: float, volume: float, pressure: float)
| 54 | |
| 55 | |
| 56 | def temperature_of_gas_system(moles: float, volume: float, pressure: float) -> float: |
| 57 | """ |
| 58 | >>> temperature_of_gas_system(2, 100, 5) |
| 59 | 30.068090996146232 |
| 60 | >>> temperature_of_gas_system(11, 5009, 1000) |
| 61 | 54767.66101807144 |
| 62 | >>> temperature_of_gas_system(3, -0.46, 23.5) |
| 63 | Traceback (most recent call last): |
| 64 | ... |
| 65 | ValueError: Invalid inputs. Enter positive value. |
| 66 | """ |
| 67 | if moles < 0 or volume < 0 or pressure < 0: |
| 68 | raise ValueError("Invalid inputs. Enter positive value.") |
| 69 | |
| 70 | return pressure * volume / (moles * UNIVERSAL_GAS_CONSTANT) |
| 71 | |
| 72 | |
| 73 | def moles_of_gas_system(kelvin: float, volume: float, pressure: float) -> float: |
nothing calls this directly
no outgoing calls
no test coverage detected