We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33266f2 commit a745ec6Copy full SHA for a745ec6
maths/special_numbers/proth_number.py
@@ -59,6 +59,16 @@ def proth(number: int) -> int:
59
return proth_list[number - 1]
60
61
62
+def test_proth_valid() -> None:
63
+ """Test the 6 first Proth numbers."""
64
+ assert proth(1) == 3, "The 1st Proth number should be 3"
65
+ assert proth(2) == 5, "The 2nd Proth number should be 5"
66
+ assert proth(3) == 9, "The 3rd Proth number should be 9"
67
+ assert proth(4) == 13, "The 4th Proth number should be 13"
68
+ assert proth(5) == 17, "The 5th Proth number should be 17"
69
+ assert proth(6) == 25, "The 6th Proth number should be 25"
70
+
71
72
if __name__ == "__main__":
73
import doctest
74
0 commit comments