Python Forum

Full Version: unexpected EOF
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
def double_word(a):

SyntaxError: unexpected EOF while parsing

    return a*2
double_word("fun")
I am a total beginner.I use Jupyter Notebook. Why does it not work?

Thank you for answer

wowo
Please use python and output tags when posting code and results. I put them in for you this time. Here are instructions for doing it yourself next time.

I can't see anything wrong with your code as posted. It would help if you could post your full code and separately post the full text of the error message.
Hallo,

thank you for answering. This the full code! I think there is something wrong in the Jupyter Notebook
because with the editor "spyder" it works. Is there anything to do after the installation of anconda?
The full error Message ist :
File "<ipython-input-1-44a61c79c9fa>", line 1
def double_word(a):
^
SyntaxError: unexpected EOF while parsing
class klaus: