def arithmetic_progression(a, d, n):
return a + (n - 1) * d

a = 2
d = 4
num_terms = 4

for i in range(1, num_terms + 1):
print(arithmetic_progression(a, d, i), end=" ")


Posted on by