mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-30 22:23:42 +00:00
Fixes on isprothnumber
This commit is contained in:
parent
48cd50279c
commit
d5bc7306f2
|
@ -76,6 +76,10 @@ def isprothnumber(number: int) -> bool:
|
||||||
...
|
...
|
||||||
TypeError: Input value of [number=6.0] must be an integer
|
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:
|
if number < 1:
|
||||||
msg = f"Input value of [number={number}] must be > 0"
|
msg = f"Input value of [number={number}] must be > 0"
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user