Answer to Question #293088 in Python for JRR

Question #293088

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
2022-02-02T05:09:52-0500
lst_of_numbers = [1, 2, 3]


for num in input().split():
	lst_of_numbers.append(int(num))


for num in lst_of_numbers:
	if num%2 == 0:
		print(num)

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