title: Need help writing a Python script that will input a sentence and count the number of words it contains
body: <pre><code>def main():
  
    p =input("Enter your sentence: ")
  
    words = p.split()
  
    wordCount = len(words)
  
    print ("The word count is:", wordCount)
  
  main()
  </code></pre>
  
  <p>I get the read out:</p>
  
  <p>Enter your sentence: Hello world
  Traceback (most recent call last): File "C:/Python27/idk.py", line 11, in  main() File "C:/Python27/idk.py", line 3, in main p =input("Enter your sentence: ") File "", line 1 Hello world ^ SyntaxError: unexpected EOF while parsing
  What am i doing wrong? D:</p>