title: syntax error in python dice game
body: <p>I got a syntax error and can't figure out what is wrong can someone please help</p>
  
  <pre><code>    import random
  
  play=input("would you like to play Y/N")
  
  if play==Y:
      dice_roll
  if play==N:
      print("try again")
      play=input("would you like to play Y/N")
  
  #declare dice as global and rolls dice 
  def dice_roll():
      global p1_dice_1
      global p1_dice_2
      global p1_dice_3
      global p2_dice_1
      global p2_dice_2
      global p2_dice_3
      p1_dice_1=random.randint(1,6)
      p1_dice_2=random.randint(1,6)
      p1_dice_3=random.randint(1,6)
      p2_dice_1=random.randint(1,6)
      p2_dice_2=random.randint(1,6)
      p2_dice_3=random.randint(1,6)
      print_test()
      return
  
  def print_test():
      print("player 1 rolled",p1_dice_1,",",p1_dice_2,"and",p1_dice_3)
      print("palyer 2 rolled",p2_dice_1,",",p2_dice_2,"and",p2_dice_3)
      score_rule()
      return
  </code></pre>
  
  <p>if this could be made less complex I wouldn't mind help</p>
  
  <pre><code> score_rule():
          if p1_dice_1==p1_dice_2==p1_dice_3:
              print("player 1 scored",p1_dice_1+p1_dice_2+p1_dice_3)
          elif p1_dice_1==p1_dice_2=!p1_dice_3:
              print("player 1 scored",p1_dice_1+p1_dice_2-p1_dice_3)
          elif p1_dice_1==p1_dice_3=!p1_dice_2:
              print("player 1 scored",p1_dice_1+p1_dice_3-p1_dice_2)
          elif p1_dice_2==p1_dice_3=!p1_dice_1:
              print("player 1 scored",p1_dice_2+p1_dice_3-p1_dice_1)
  
      if p2_dice_1==p2_dice_2==p2_dice_3:
          print("player 2 scored",p2_dice_1+p2_dice_2+p2_dice_3)
      elif p2_dice_1==p2_dice_2=!p2_dice_3:
          print("player 2 scored",p2_dice_1+p2_dice_2-p2_dice_3)
      elif p2_dice_1==p2_dice_3=!p2_dice_2:
          print("player 2 scored",p2_dice_1+p2_dice_3-p2_dice_2)
      elif p2_dice_2==p2_dice_3=!p2_dice_1:
          print("player 2 scored",p2_dice_2+p2_dice_3-p2_dice_1)
      return
  </code></pre>
  
  <p>if anyone knows what to do help please I am having to put more words in the question because there is too much code (apparently)</p>