@@ -12,7 +12,7 @@ def molarity_to_normality(nfactor: int, moles: float, volume: float) -> float:
12
12
8.0
13
13
14
14
"""
15
- return ( float (moles / volume ) * nfactor )
15
+ return round (( float (moles / volume ) * nfactor ) )
16
16
17
17
def moles_to_pressure (volume : float , moles : float , temperature : float ) -> float :
18
18
"""
@@ -30,7 +30,7 @@ def moles_to_pressure(volume: float, moles: float, temperature: float) -> float:
30
30
10
31
31
32
32
"""
33
- return float ((moles * 0.0821 * temperature )/ (volume ))
33
+ return round ( float ((moles * 0.0821 * temperature )/ (volume ) ))
34
34
35
35
def moles_to_volume (pressure : float , moles : float , temperature : float ) -> float :
36
36
"""
@@ -48,7 +48,7 @@ def moles_to_volume(pressure: float, moles: float, temperature: float) -> float:
48
48
10
49
49
50
50
"""
51
- return float ((moles * 0.0821 * temperature )/ (pressure ))
51
+ return round ( float ((moles * 0.0821 * temperature )/ (pressure ) ))
52
52
53
53
def pressure_and_volume_to_temperature (pressure : float , moles : float , volume : float ) -> float :
54
54
"""
@@ -66,7 +66,7 @@ def pressure_and_volume_to_temperature(pressure: float, moles: float, volume: fl
66
66
60
67
67
68
68
"""
69
- return float ((pressure * volume )/ (0.0821 * moles ))
69
+ return round ( float ((pressure * volume )/ (0.0821 * moles ) ))
70
70
71
71
72
72
if __name__ == "__main__" :
0 commit comments