title: How to fix a while syntax error in python?
body: <p>I'm getting a syntax error on my 2nd while loop. Can't figure out why, any help appreciated :)</p>
  
  <pre><code>#intro
  print("Welcome to my prime number detector.")
  print("Provide an integer and I will determine if it is prime.")
  
  #again loop
  again = "Y"
  while again == "Y":
      num = (int(input("Enter an integer"))
  
      #check for valid input
      while num &lt; 1:
          num = (int(input("Enter an integer"))
  
      #test for prime 
      for d in range(2,num):
          if (num % d) == 0:
              print(num,"is not prime.")
          else:
              print(num,"is prime.")
  
      #ask again
      again = intput("Do you want to play again? (Y/N)")
  </code></pre>