@@ -79,6 +79,7 @@ def __categorize_system(argument_value: float, argument_name: str) -> None:
7979 else :
8080 raise ValueError ("Should be 'work', 'heat', or 'internal_energy_variation'." )
8181
82+
8283def work (heat : float , internal_energy_variation : float ) -> float :
8384 """
8485 >>> work(50.0, -20.0)
@@ -102,7 +103,7 @@ def work(heat: float, internal_energy_variation: float) -> float:
102103
103104 __categorize_system (heat , "heat" )
104105 __categorize_system (internal_energy_variation , "internal_energy_variation" )
105-
106+
106107 work = heat - internal_energy_variation
107108 __categorize_system (work , "work" )
108109 return round (work , 1 )
@@ -131,7 +132,7 @@ def heat(internal_energy_variation: float, work: float) -> float:
131132
132133 __categorize_system (internal_energy_variation , "internal_energy_variation" )
133134 __categorize_system (work , "work" )
134-
135+
135136 heat = round (internal_energy_variation + work , 1 )
136137 __categorize_system (heat , "heat" )
137138 return heat
@@ -160,7 +161,7 @@ def internal_energy_variation(heat: float, work: float) -> float:
160161
161162 __categorize_system (heat , "heat" )
162163 __categorize_system (work , "work" )
163-
164+
164165 internal_energy_variation = round (heat - work , 1 )
165166 __categorize_system (internal_energy_variation , "internal_energy_variation" )
166167 return internal_energy_variation
0 commit comments