mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -47,7 +47,7 @@ def solution(n: int = 20) -> int:
|
||||
|
||||
try:
|
||||
n = int(n)
|
||||
except (TypeError, ValueError):
|
||||
except TypeError, ValueError:
|
||||
raise TypeError("Parameter n must be int or castable to int.")
|
||||
if n <= 0:
|
||||
raise ValueError("Parameter n must be greater than or equal to one.")
|
||||
|
||||
Reference in New Issue
Block a user