What is wrong with this filter method | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is wrong with this filter method

I am trying to solve that's odd code coach problem but solution which i found has error plz help to clear it https://code.sololearn.com/cKV9YmhrNGLw/?ref=app

21st Aug 2020, 11:22 AM
Pratik Shinde
Pratik Shinde - avatar
8 Answers
+ 4
Got it thanksAbhay
21st Aug 2020, 12:05 PM
Pratik Shinde
Pratik Shinde - avatar
+ 3
Missing closing parenthesis at line 8
21st Aug 2020, 11:26 AM
Abhay
Abhay - avatar
+ 3
Instead of hola = list(filter(lambda x: x % 2 == 0, lis) It should be hola = list(filter(lambda x: x % 2 == 0, lis)) Also convert input() to int when asking for user input
21st Aug 2020, 11:31 AM
Abhay
Abhay - avatar
+ 2
Pratik Shinde h = int(input())
21st Aug 2020, 11:56 AM
Abhay
Abhay - avatar
+ 1
Abhay yes but still not working saying not all argument converted to list
21st Aug 2020, 11:32 AM
Pratik Shinde
Pratik Shinde - avatar
+ 1
If you did what I said then inputting this way 5 1 2 3 4 5 Works fine for me
21st Aug 2020, 11:33 AM
Abhay
Abhay - avatar
+ 1
Plz share your code bit code Abhay I still didn't find it after making changes you said https://code.sololearn.com/cKV9YmhrNGLw/?ref=app
21st Aug 2020, 11:52 AM
Pratik Shinde
Pratik Shinde - avatar
+ 1
✌️
21st Aug 2020, 12:06 PM
Abhay
Abhay - avatar