Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d5bc730

Browse files
author
Juanitoupipou
committedNov 27, 2024·
Fixes on isprothnumber
1 parent 48cd502 commit d5bc730

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎maths/special_numbers/proth_number.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ def isprothnumber(number: int) -> bool:
7676
...
7777
TypeError: Input value of [number=6.0] must be an integer
7878
"""
79+
if not isinstance(number, int):
80+
msg = f"Input value of [number={number}] must be an integer"
81+
raise TypeError(msg)
82+
7983
if number < 1:
8084
msg = f"Input value of [number={number}] must be > 0"
8185
raise ValueError(msg)

0 commit comments

Comments
 (0)
Please sign in to comment.