Answer to Question #257868 in Python for pau

Question #257868

 Only the Even Ones

by CodeChum Admin

I have a list of 3 numbers here with me that's already in the code editor, but I want you to add some more to this list by inputting some more numbers yourself in one line and then, print out only the even numbers from the list.

Can you do that for me?


Input

A line containing integers separated by a space.

33·54·32·11·8

Output

Multiple lines containing an integer.

2
54
32
8




1
Expert's answer
2021-10-30T19:38:29-0400
inputValues=input().split(' ')
for n in inputValues: 
    if (int(n)%2==0):
        print(n)

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