- Write a program that prints all of the elements in a list thatare divisible by 5. PYTHON
Solution
CODE:
# create a listnumbers = [1,2,3,4,5,6,7,8,9,10]# loop through all the elements of the listfor i in numbers: # if number is divisible by 5 then print it. if i % 5 == 0: print(i)
OUTPUT:
#
OR
OR