Computer Science, asked by Ng33, 2 months ago

Write a Python program to store 10

numbers in a list. Now traverse the list and print the numbers which are divisible by 3 or by 5.

Answers

Answered by madhalaimuthucharlas
2

Answer:

l= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

for i in l:

if i % 3 == 0:

print(i, "is divisible by 3")

if i % 5 == 0:

print(i, "is divisible by 5")

Similar questions