progress_set has 10 elements with index 0 through 9, thus there is no element 10, so operation needs to be below 10. You can use integer division // and get rid of mapping to int instead of using real division / on the last line. You probably also want operation to be positive.
Thx, but I actually set start of the range to 0 on purpose, since I know that Python uses zero-based indexing...? I can find the specific number based on its position, just like in the formula an = a1 + d(n-1)
1
u/AlexMTBDude 17d ago
1
u/Educational-Paper-75 14d ago
progress_set has 10 elements with index 0 through 9, thus there is no element 10, so operation needs to be below 10. You can use integer division // and get rid of mapping to int instead of using real division / on the last line. You probably also want operation to be positive.
2
u/[deleted] 18d ago edited 18d ago
[removed] — view removed comment