Answer to Question #236717 in Python for mahesh

Question #236717

Multiples of 3

You are given

N inputs. Print the numbers that are multiples of 3.Input

The first line of input is an integer

N. The next N lines each contain an integer as input.



1
Expert's answer
2021-09-13T12:18:38-0400
N = int(input())
data = []
for i in range(N):
    data.append(int(input()))
for i in data:
    if i % 3 == 0:
        print(i)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS