+ 1
Code Coach Even Numbers Bug?
I have a nagging feeling that code coach even numbers (Python) has a bug in it. Since I donât want to post code coach solutions here, would someone knowledgeable get in contact with me via PM? I will post teachable moments here later in order for this post to have value in the forum.
3 Respostas
+ 3
If you think that the question has a bug in it then you can report it to sololearn via info@sololearn.com.
- 1
My take:
x = input().split()
res = [i for i in x if int(i) % 2 == 0]
print(*res)
- 2
Here is my code on Even Numbers code coach
n=input().split()
l=[]
s=" "
for i in n:
l.append(int(i))
for i in l:
if (i % 2==0):
s=s+str(i)+" "
print(s)