Python Forum
Thread Rating:
  • 4 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unexpected EOF
#1
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
Reply
#2
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.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
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
Reply
#4
class klaus:
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020