Fixes on isprothnumber

This commit is contained in:
Juanitoupipou 2024-11-27 16:32:34 +01:00
parent 48cd50279c
commit d5bc7306f2

View File

@ -76,6 +76,10 @@ def isprothnumber(number: int) -> bool:
...
TypeError: Input value of [number=6.0] must be an integer
"""
if not isinstance(number, int):
msg = f"Input value of [number={number}] must be an integer"
raise TypeError(msg)
if number < 1:
msg = f"Input value of [number={number}] must be > 0"
raise ValueError(msg)