title: How to fix this syntax error and Eof?
body: <p>So I am writing a program but terminal is giving me a syntax error and some other websites are giving me EOF errors. Also if I enter a string it gives me a error even though I put a ValueError in my code. How can I fix this.</p>
  
  <pre><code>while True:
  try:
      a = (input("Enter 15 numbers: ").split())
      a = [int(i) for i in a]
      b = sorted(a)
      c = False
  except ValueError:
      print("Please enter a number.")
      continue
      if len(b) &gt; 15 or len(b) &lt; 15:
          print("Please enter exactly 15 numbers")
  else:
      c = True
      break
  
  if c == True:
  print("Hello")
  else:
  bob = 1
  print("done")
  </code></pre>
  
  <p>EOF Error:</p>
  
  <pre><code>$python main.py
  Enter 15 numbers: Traceback (most recent call last):
  File "main.py", line 3, in &lt;module&gt;
  a = input("Enter 15 numbers: ").split()
  EOFError: EOF when reading a line
  </code></pre>
  
  <p>Syntax Error:</p>
  
  <pre><code>a = (input("Enter 15 numbers: ").split())
  File "&lt;string&gt;", line 1
  1 1 1 1 1 2 2 2 2 2 3 3 3 3 3
    ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>String Error:</p>
  
  <pre><code>File "inp.py", line 3, in &lt;module&gt;
  a = (input("Enter 15 numbers: ").split())
  File "&lt;string&gt;", line 1, in &lt;module&gt;
  NameError: name 'd' is not defined
  </code></pre>