Multiplication Table
2/7
Many problems ask you to generate a sequence instead of computing a single value. The pattern is always the same: start an empty list, loop over the positions, and push each value.
table = []
for i in range(1, 11):
table.append(n * i)
Think about the loop bounds before writing them. Off-by-one errors, such as stopping at 9 or starting at 0, are the most common bug in loops like this. Say the range out loud: "from 1 up to and including 10."