title: Printing Score - Pygame
body: <p>Does anyone know how I can get the score to be displayed on the screen of my game?</p>
  
  <p>So far I have this code:</p>
  
  <pre><code>for bullet in bullet_list:
  
          block_hit_list = pygame.sprite.spritecollide(bullet, block_list, True)
  
          for block in block_hit_list:
          explosion.play()
          bullet_list.remove(bullet)
          all_sprites_list.remove(bullet)
          score += 10
          font = pygame.font.Font(None, 36)
          text = font.render(score, 1, (WHITE))
          textpos = text.get_rect(centerx=background.get_width()/2)
          background.blit(text, textpos)
  
      if bullet.rect.y &lt; -10:
          bullet_list.remove(bullet)
          all_sprites_list.remove(bullet)
  </code></pre>
  
  <p>However, I recieve this error once I launch the game and shoot a bullet: </p>
  
  <p>"text = font.render(score, 1, (WHITE))</p>
  
  <p>TypeError: text must be a unicode or bytes"</p>
  
  <p>Does anyone know how I can solve this issue?</p>
  
  <p>Thank you</p>