title: Tic Tac Toe: display score, prevent duplicate entries, print draw
body: <p>I'm new to Python and programming, and I'm trying to make a tic tac toe game based on specific guidelines.</p>
  
  <p>This is my code: </p>
  
  <pre><code>import random
  import time
  
  marker = {'Player 1 ': 'X', 'Player 2 ': 'O', }
  board = [' ',' ',' ',' ',' ',' ',' ',' ',' ']
  turn = '0'
  game_round ='0'
  
  def display_board(board):
      print('7  |8  |9')
      print(' ' + board[7] + ' | ' + board[8] + ' | ' + board[9])
      print('   |   |')
      print('-----------')
      print('4  |5  |6')
      print(' ' + board[4] + ' | ' + board[5] + ' | ' + board[6])
      print('   |   |')
      print('-----------')
      print('1  |2  |3')
      print(' ' + board[1] + ' | ' + board[2] + ' | ' + board[3])
      print('   |   |')
  
  
  def choose_first():
      if random.randint(0, 1) == 0:
          return 'Player 1 '
      elif random.randint(0, 1) == 1:
          return 'Player 2 '
  
  def display_score(score):
      score = 0
      if score(board,mark):
          score += 1 
  
       #Prints final score after each round
  
  def place_marker(board, marker, position):
  
      board[position] = marker
  
      #places marker (X or O) in position 
  
  
  def win_check(board,mark):
      win_combs = (
      [1, 2, 3], [4, 5, 6], [7, 8, 9], [3, 6, 9], [1, 4, 7], [2, 5, 8],
      [1, 5, 9], [3, 5, 7],)
      for comb in win_combs:
          if (board[comb[0]] == board[comb[1]] == board[comb[2]] == mark):
              return True
      return False
  
      #returns True if 3 same marks (X or O) are in line(win)
  def board_check(board):
      if board != [' '] :
          return False
      else:
          return True 
  
      #returns False if there are still empty blocks in the board
      #or True otherwise.
  def player_choice(board, turn):
      first = turn
      while turn not in '1 2 3 4 5 6 7 8 9'.split():
            turn = input(turn +'Insert number 1-9 :')
      return int(turn)
  
      #Player (turn) selects a block
      #An int is returned [1,9]
      #Checks if value is already submitted in the same block
  def replay(): 
      print('Do you want to play again? (yes or no)')
      return input().lower().startswith('y')
  
      #Asks players to play again
  def next_player(turn): 
      first=turn
      if first == 'Player 1 ':
          return 'Player 2 '
      else:
          return 'Player 1 '
  
  def main():
      score = {} # dictionary containing players scores
      print('Getting ready to start!\nCoin Toss ', end = '')
      for t in range(10):
          print(".", flush='True', end=' ')
          time.sleep(0.2)
      print()
      # turn variable reffers to the player whos currently playing
      turn = choose_first() 
      print("\n " + turn + ' goes first!!')
      # first variable reffers to the player who played first
      first = turn 
      game_round = 1
      while True:
  
          theBoard = [' '] * 10 
  
          game_on = True
          while game_on:
              display_board(theBoard)
              position = player_choice(theBoard, turn) 
              place_marker(theBoard, marker[turn], position) 
              if win_check(theBoard, marker[turn]):
                  display_board(theBoard)
                  print(turn+ "Won")
                  score[turn] = score.get(turn, 0) + 1
                  game_on = False
              elif board_check(theBoard): 
                  display_board(theBoard)
                  print('Draw')
                  game_on = False
              else: 
                  turn = next_player(turn)
          if not replay():
              ending = ''
              if game_round&gt;1 : ending = 's'
              print("After {} round{}".format(game_round, ending))
              display_score(score)
              break
          else :
              game_round += 1
              #in the next round the other player plays first
              turn = next_player(first) 
              first = turn
  main()
  </code></pre>
  
  <p>Issues:</p>
  
  <ol>
  <li>The <strong>def board_check</strong> is not working properly and when the board is full the program still accepts submissions.</li>
  <li>I want to prevent user from submitting a value in a block that's already occupied by another value within the <strong>def player_choice</strong>.</li>
  <li>I can't get the <strong>def display_score</strong> to work.</li>
  </ol>