for i in range(0, 11, 2): #range follows (start, stop, step) print(i) # 0 2 4 6 8 10
n = 2 #set variable to complete the output for i in range(2, 20 +n, n): #range("begin" , "end" , "increment by") print(i, end = " ") #print horizontally