We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc33c50 commit e4ae0f8Copy full SHA for e4ae0f8
maths/special_numbers/hamming_numbers.py
@@ -13,6 +13,10 @@ def hamming(n_element: int) -> list:
13
:param n_element: The number of elements on the list
14
:return: The nth element of the list
15
16
+ >>> hamming(-5)
17
+ Traceback (most recent call last):
18
+ ...
19
+ ValueError: a should be a positive number
20
>>> hamming(5)
21
[1, 2, 3, 4, 5]
22
>>> hamming(10)
0 commit comments