@@ -5,7 +5,7 @@ def validate_elements_count(
5
5
total_elements_count : int , selected_elements_count : int
6
6
) -> None :
7
7
"""
8
- Validate that the number of elements are positive and
8
+ Validate that the number of elements are positive and
9
9
the total is greater than or equal to selected.
10
10
Examples:
11
11
>>> validate_elements_count(6, 3)
@@ -24,7 +24,7 @@ def combinations_iterative(
24
24
total_elements_count : int , selected_elements_count : int
25
25
) -> int :
26
26
"""
27
- Returns the number of combinations that can be made
27
+ Returns the number of combinations that can be made
28
28
from a total set of elements.
29
29
30
30
Examples:
@@ -41,8 +41,8 @@ def combinations_iterative(
41
41
>>> combinations_iterative(-4, -5)
42
42
Traceback (most recent call last):
43
43
...
44
- ValueError: Please enter positive integers for total_elements_count
45
- and selected_elements_count where
44
+ ValueError: Please enter positive integers for total_elements_count
45
+ and selected_elements_count where
46
46
total_elements_count >= selected_elements_count
47
47
"""
48
48
validate_elements_count (total_elements_count , selected_elements_count )
@@ -101,8 +101,8 @@ def combinations_formula(
101
101
>>> combinations_formula(-4, -5)
102
102
Traceback (most recent call last):
103
103
...
104
- ValueError: Please enter positive integers for
105
- total_elements_count and selected_elements_count
104
+ ValueError: Please enter positive integers for
105
+ total_elements_count and selected_elements_count
106
106
where total_elements_count >= selected_elements_count
107
107
"""
108
108
validate_elements_count (total_elements_count , selected_elements_count )
@@ -133,8 +133,8 @@ def combinations_with_repetitions(
133
133
>>> combinations_with_repetitions(-4, -5)
134
134
Traceback (most recent call last):
135
135
...
136
- ValueError: Please enter positive integers for
137
- total_elements_count and selected_elements_count
136
+ ValueError: Please enter positive integers for
137
+ total_elements_count and selected_elements_count
138
138
where total_elements_count >= selected_elements_count
139
139
"""
140
140
validate_elements_count (total_elements_count , selected_elements_count )
@@ -148,7 +148,7 @@ def combinations_with_repetitions(
148
148
149
149
def permutations (total_elements_count : int , selected_elements_count : int ) -> int :
150
150
"""
151
- Calculate the number of permutations of selecting k elements
151
+ Calculate the number of permutations of selecting k elements
152
152
from n elements.
153
153
154
154
Examples:
@@ -165,8 +165,8 @@ def permutations(total_elements_count: int, selected_elements_count: int) -> int
165
165
>>> permutations(-4, -5)
166
166
Traceback (most recent call last):
167
167
...
168
- ValueError: Please enter positive integers for
169
- total_elements_count and selected_elements_count
168
+ ValueError: Please enter positive integers for
169
+ total_elements_count and selected_elements_count
170
170
where total_elements_count >= selected_elements_count
171
171
"""
172
172
validate_elements_count (total_elements_count , selected_elements_count )
@@ -176,7 +176,7 @@ def permutations(total_elements_count: int, selected_elements_count: int) -> int
176
176
177
177
def possible_selections (total_elements_count : int , selected_elements_count : int ) -> int :
178
178
"""
179
- Calculate the number of possible selections of k items
179
+ Calculate the number of possible selections of k items
180
180
from n available items, with replacement.
181
181
182
182
Examples:
@@ -193,8 +193,8 @@ def possible_selections(total_elements_count: int, selected_elements_count: int)
193
193
>>> possible_selections(-4, -5)
194
194
Traceback (most recent call last):
195
195
...
196
- ValueError: Please enter positive integers for
197
- total_elements_count and selected_elements_count
196
+ ValueError: Please enter positive integers for
197
+ total_elements_count and selected_elements_count
198
198
where total_elements_count >= selected_elements_count
199
199
"""
200
200
validate_elements_count (total_elements_count , selected_elements_count )
0 commit comments