File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 17
17
from math import pow , sqrt
18
18
19
19
20
- def validate (* values ) -> bool :
20
+ def validate (* values : float ) -> bool :
21
+ """
22
+ Input Parameters:
23
+ -----------------
24
+ effusion_rate_1: Effustion rate of first gas (m^2/s, mm^2/s, etc.)
25
+ effusion_rate_2: Effustion rate of second gas (m^2/s, mm^2/s, etc.)
26
+ molar_mass_1: Molar mass of the first gas (g/mol, kg/kmol, etc.)
27
+ molar_mass_2: Molar mass of the second gas (g/mol, kg/kmol, etc.)
28
+
29
+ Returns:
30
+ --------
31
+ >>> validate(2.016, 4.002)
32
+ True
33
+ >>> validate(-2.016, 4.002)
34
+ Traceback (most recent call last):
35
+ ...
36
+ ValueError: Invalid inputs. Effusion rates and molar masses must be a positive
37
+ value.
38
+ >>> validate()
39
+ False
40
+ """
21
41
for value in values :
22
42
if value >= 0.0 :
23
43
return True
You can’t perform that action at this time.
0 commit comments