From d5bc7306f2dda94950f7ad7b13bd4aa8edc58f0d Mon Sep 17 00:00:00 2001 From: Juanitoupipou Date: Wed, 27 Nov 2024 16:32:34 +0100 Subject: [PATCH] Fixes on isprothnumber --- maths/special_numbers/proth_number.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maths/special_numbers/proth_number.py b/maths/special_numbers/proth_number.py index 146e6fc90..181cc1afb 100644 --- a/maths/special_numbers/proth_number.py +++ b/maths/special_numbers/proth_number.py @@ -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)