File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,11 @@ def int_cast(obj: str) -> str:
55
55
56
56
57
57
# noinspection PyShadowingBuiltins,PyUnusedLocal
58
- def pow ( value : int , exponent : int ) -> int :
58
+ def exit_program ( exit_code : int = 0 ) -> None :
59
59
"""
60
- Calculates a number to the power of the given exponent .
60
+ Terminates the program .
61
61
62
- :param value: The base value.
63
- :param exponent: The exponent's value.
64
- :return: The power of the base to the exponent.
62
+ :param exit_code: Returns this value as the status code.
65
63
"""
66
64
67
65
@@ -103,9 +101,8 @@ def pow(value: int, exponent: int) -> int:
103
101
code = "return std::stoi(obj);" ,
104
102
dependencies = {"iostream" }
105
103
),
106
- "pow" : PyPortFunctionSignature (
107
- function = pow ,
108
- code = "return pow(value, exponent);" ,
109
- dependencies = {"cmath" }
104
+ "exit" : PyPortFunctionSignature (
105
+ function = exit_program ,
106
+ code = "exit(exit_code);"
110
107
)
111
108
}
You can’t perform that action at this time.
0 commit comments