Bottom Page

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
Quote
#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

Quote
#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
Quote
#4
class klaus:

Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  syntax error near unexpected token btom529 5 267 Apr-21-2019, 09:03 PM
Last Post: btom529
  Getting an unexpected generator object ? mcgrim 19 424 Mar-29-2019, 11:35 AM
Last Post: gontajones
  Dictionary adds an unexpected list erina 1 189 Mar-14-2019, 01:13 PM
Last Post: ichabod801
  unexpected EOF while parsing whatloop 3 412 Mar-09-2019, 06:59 PM
Last Post: whatloop
  Unexpected round behavior pythonCoder 1 163 Feb-19-2019, 02:39 PM
Last Post: marienbad
  Unexpected expected type error result MartinMaker 1 199 Feb-16-2019, 05:02 PM
Last Post: micseydel
  Unexpected ininite loop behavior RedSkeleton007 4 208 Jan-27-2019, 05:32 PM
Last Post: aakashjha001
  unexpected sub result after overloading operator jolinchewjb 1 242 Jan-24-2019, 08:23 AM
Last Post: buran
  float multiplication - unexpected output inesk 3 335 Dec-11-2018, 10:59 AM
Last Post: DeaD_EyE
  Unexpected result eftimios 1 311 Dec-02-2018, 07:39 AM
Last Post: Gribouillis

Forum Jump:


Users browsing this thread: 1 Guest(s)