My code works in codecademy, but not in atom



I think it has something to do with raw_input function. It gave me an EOF error and I don’t know what that means. The code used is a copy of the solutions from codecademy.


alright, just an idea, but instead of using raw_input, just try using input.

x=int(input(“what is your age”))


Save this tiny script, and run it…

import sys
print (sys.version)

If it is 3.x.x, then you must use input() as mentioned above, but you must also use print () with parens since it is a function in Python 3. If it is 2.x.x then use raw_input(). It won’t matter if you use parens on print, but you can for practice.


Tried that but the same error came up


Be sure your code contains only standard quotes " not the fancy kind.


What does the End of file error mean. I googled it, but could not find any relevant information.


It means the line cannot be parsed to the end of line. Try replacing all the quotes with ".

Hold down the ALt key and on your numeric keypad, type 34 then let go of the Alt key.



I tried replacing all quotes with ", but the same error shows up. I also don’t have a numeric keypad since i am on a laptop. I tried running the code in and it works fine in that as well.


Your code appears to be rendering and waiting for input. What have you entered at the prompt?


I can’t input anything in atom since the error shows up


That’s strange. I don’t see anything wrong with the code, and you are running Python 2.7 so raw_input() should work. Just for the sake of trying,

print (eval(input())

then see if you get an input prompt. Try typing something if you do, and Enter.




Is this because i configured atom wrong. I downloaded this package to help me run the code:beep%20bop


I really know nothing about Atom, so will need to defer this to somebody who does. Sorry I have to bow out.


Yea, same i don’t use atom. But i will look more closely


I think atom has a different compiler than codecademy.


what would you suggest i do ?


I think i know what the problem is guys. Thank you for replying. I think i should use something other than atom to run scripts next time.


a compiler for an interpreted language?

@digitalninja63049, what if you use the python interpreter in the command line to run script? Then you can determine if problem is with atom-runner.


Yes, use sublime text 3 it’s really great for python programming.