Skip to content

Commit c8e2982

Browse files
authored
Update basic_string.py
1 parent 561e5a0 commit c8e2982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

genetic_algorithm/basic_string.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def select(
7171
>>> parent_1 = ("123456", 8.0)
7272
>>> population_score = [("abcdef", 4.0), ("ghijkl", 5.0), ("mnopqr", 7.0)]
7373
>>> genes = list("ABCDEF")
74-
>>> child_n = int(min(parent_1[1]) + 1, 10))
74+
>>> child_n = int(min(parent_1[1] + 1, 10))
7575
>>> population = []
7676
>>> for _ in range(child_n):
7777
... parent_2 = population_score[random.randrange(len(population_score))][0]

0 commit comments

Comments
 (0)