mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
e4faf6bfb5
commit
9f684576bb
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user