Skip to content

Commit d05be3d

Browse files
kbucBethanyG
authored andcommitted
Meltdown mitigation: rephrased docstring type hinting
1 parent 8a8c837 commit d05be3d

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

exercises/concept/meltdown-mitigation/.meta/exemplar.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
def is_criticality_balanced(temperature, neutrons_emitted):
22
"""Verify criticality is balanced.
33
4-
:param temperature: Union[int,float] temperature
5-
:param neutrons_emitted: Union[int,float] number of neutrons emitted per second
4+
:param temperature: temperature value (integer or float)
5+
:param neutrons_emitted: number of neutrons emitted per second (integer or float)
66
:return: boolean True if conditions met, False if not
77
88
A reactor is said to be critical if it satisfies the following conditions:
@@ -22,9 +22,9 @@ def is_criticality_balanced(temperature, neutrons_emitted):
2222
def reactor_efficiency(voltage, current, theoretical_max_power):
2323
"""Assess reactor efficiency zone.
2424
25-
:param voltage: Union[int,float] voltage
26-
:param current: Union[int,float] current
27-
:param theoretical_max_power: Union[int,float] power that corresponds to a 100% efficiency
25+
:param voltage: voltage value (integer or float)
26+
:param current: current value (integer or float)
27+
:param theoretical_max_power: power that corresponds to a 100% efficiency (integer or float)
2828
:return: str one of 'green', 'orange', 'red', or 'black'
2929
3030
Efficiency can be grouped into 4 bands:
@@ -57,9 +57,9 @@ def reactor_efficiency(voltage, current, theoretical_max_power):
5757
def fail_safe(temperature, neutrons_produced_per_second, threshold):
5858
"""Assess and return safety range.
5959
60-
:param temperature: Union[int,float]
61-
:param neutrons_produced_per_second: Union[int,float]
62-
:param threshold: Union[int,float]
60+
:param temperature: value of the temperature (integer or float)
61+
:param neutrons_produced_per_second: neutron flux (integer or float)
62+
:param threshold: threshold (integer or float)
6363
:return: str one of: 'LOW', 'NORMAL', 'DANGER'
6464
6565
- `temperature * neutrons per second` < 40% of `threshold` == 'LOW'

exercises/concept/meltdown-mitigation/conditionals.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
def is_criticality_balanced(temperature, neutrons_emitted):
55
"""Verify criticality is balanced.
66
7-
:param temperature: Union[int,float] temperature
8-
:param neutrons_emitted: Union[int,float] number of neutrons emitted per second
7+
:param temperature: temperature value (integer or float)
8+
:param neutrons_emitted: number of neutrons emitted per second (integer or float)
99
:return: boolean True if conditions met, False if not
1010
1111
A reactor is said to be critical if it satisfies the following conditions:
@@ -20,9 +20,9 @@ def is_criticality_balanced(temperature, neutrons_emitted):
2020
def reactor_efficiency(voltage, current, theoretical_max_power):
2121
"""Assess reactor efficiency zone.
2222
23-
:param voltage: Union[int,float] voltage
24-
:param current: Union[int,float] current
25-
:param theoretical_max_power: Union[int,float] power that corresponds to a 100% efficiency
23+
:param voltage: voltage value (integer or float)
24+
:param current: current value (integer or float)
25+
:param theoretical_max_power: power that corresponds to a 100% efficiency (integer or float)
2626
:return: str one of 'green', 'orange', 'red', or 'black'
2727
2828
Efficiency can be grouped into 4 bands:
@@ -43,9 +43,9 @@ def reactor_efficiency(voltage, current, theoretical_max_power):
4343
def fail_safe(temperature, neutrons_produced_per_second, threshold):
4444
"""Assess and return safety range.
4545
46-
:param temperature: Union[int,float] teperature value
47-
:param neutrons_produced_per_second: Union[int,float] the electron flux
48-
:param threshold: Union[int,float] the threshold value
46+
:param temperature: value of the temperature (integer or float)
47+
:param neutrons_produced_per_second: neutron flux (integer or float)
48+
:param threshold: threshold (integer or float)
4949
:return: str one of: 'LOW', 'NORMAL', 'DANGER'
5050
5151
- `temperature * neutrons per second` < 40% of `threshold` == 'LOW'

0 commit comments

Comments
 (0)