[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-08-02 23:12:57 +00:00
parent e4faf6bfb5
commit 9f684576bb

View File

@ -52,6 +52,7 @@ def volume_of_gas_system(moles: float, kelvin: float, pressure: float) -> float:
raise ValueError("Invalid inputs. Enter positive value.")
return moles * kelvin * UNIVERSAL_GAS_CONSTANT / pressure
def temperature_of_gas_system(moles: float, volume: float, pressure: float) -> float:
"""
>>> temperature_of_gas_system(2, 100, 5)
@ -68,6 +69,7 @@ def temperature_of_gas_system(moles: float, volume: float, pressure: float) -> f
return (pressure * volume) / (moles * UNIVERSAL_GAS_CONSTANT)
def num_moles_of_gas_in_system(kelvin: float, volume: float, pressure: float) -> float:
"""
>>> temperature_of_gas_system(100, 5, 10)
@ -84,6 +86,7 @@ def num_moles_of_gas_in_system(kelvin: float, volume: float, pressure: float) ->
return (pressure * volume) / (kelvin * UNIVERSAL_GAS_CONSTANT)
if __name__ == "__main__":
from doctest import testmod