Answer:
Step-by-step explanation:
(a) the range function has parameters as range(start, stop, step). Since our sequence starts at 5, stops at 21 prior to 22 and has a step side of 4
L = range(5, 22, 4)
(b)
for e in L:
print(e)
(c)Since our sequence starts at 26, stops at 5 prior to 4 and has a step side of 7 negatively
L2 = range(26, 4, -7)
(d) we can set up a total variable initially equals to 0. The add it to each element of L2 in the loop:
total = 0
for e in L2:
total += e
print(total)