Programming Examples
Python program that creates a list of numbers from 1 to 20 that are divisible by 4
Write a python program that creates a list of numbers from 1 to 20 that are divisible by 4
SolutiondivBy4=[ ]
for i in range(21):
if (i%4==0):
divBy4.append(i)
print(divBy4)
Output[0, 4, 8, 12, 16, 20]
