Purify, working code, not passing


I’ve checked the following code in python visualizer and it works, but for some reason it is not being accepted as an answer and I am not receiving any error messages.

def purify(numbers):
for i in numbers:
if i%2 != 0:
return numbers

Can anyone explain why this is happening?


Others can’t try running that unless they get an exact copy of it.
Are there no indications whatsoever for why your code fails? No red text from codecademy explaining which test case it fails on?

I suspect your function does not correctly handle this input:

[1, 1, 1, 2, 2, 2]


nevermind, I figured it out.


I was not getting the error messages on failure


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.