I've added my own code in a picture below. I didnt really notice any error, which would cause problems in your code. The main issues I had with your code is purely readability. You should start using the format function along with the curly brackets to concatenate variables into strings. You should also start doing even += 1 instead of even = even + 1. I also tweaked your range function. Simply putting n makes it much easier to read and understand.