Skip to content

Commit 434c528

Browse files
committed
fix: index out of range
1 parent df01847 commit 434c528

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

brain_games/games/progression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_question_msg() -> str:
1616
position = random.randint(0, length - 1)
1717
start_num = random.randint(0, 10)
1818
step = random.randint(1, 10)
19-
stop_num = start_num + step * (length - 1)
19+
stop_num = start_num + step * length
2020
progression_lst = [str(num) for num in range(start_num, stop_num, step)]
2121
global hidden_number
2222
hidden_number = progression_lst[position]

0 commit comments

Comments
 (0)