title: bullet not appearing in pygame
body: <p>i have tried making bullet in pygame  using this tutorial <a href="https://youtu.be/8wEYDLVrAB8" rel="nofollow noreferrer">https://youtu.be/8wEYDLVrAB8</a> but i have failed to do so here is commented  code ,
  . if problem arise please leave a comment on it . thank you for helping .i have already asked it once in this website but it didnt work [![  this is current state when firing bullet][1]][1] . i am running it in pycharm</p>
  <pre><code>import pygame
  import random
  #module importing
  pygame.init()
  pygame.display.init()
  #screen creation
  screen = pygame.display.set_mode((800, 600))
  bacground = pygame.image.load(&quot;background.png&quot;)
  
  
  #player information
  playerimg = pygame.image.load(&quot;spaceship.png&quot;)
  playerX_change = 0
  playerX = 360
  playerY = 480
  
  #enemy information
  enemyimg = pygame.image.load(&quot;enemy.png&quot;)
  enemyX = random.randint(0,736)
  enemyY = random.randint(50,150)
  enemyX_change = 4
  enemyY_change = 40
  #bullet information
  bulletimg = pygame.image.load(&quot;enemy.png&quot;)
  bulletX = 0
  bulletY = 480
  bulletX_change = 0
  bulletY_change = 40
  bullet_state = &quot;ready&quot;
  #all three functions
  def player(x, y):
      screen.blit(playerimg, (x, y))
  #enemy draw function
  def enemy(x, y):
      screen.blit(enemyimg, (x, y))
  
  
  #bullet fire function
  
  def fire_bullet(x, y):
      global bullet_state
      bullet_state = &quot;fire&quot;
      screen.blit(bulletimg, (x + 16, y+10))
  
  
  # drawing player on screen
  
  
  
  # game loop
  running = True
  
  while running == True:
  #stuff happening in game loop
      screen.fill((200, 200, 0))
      screen.blit(bacground,(0,0))
      player(playerX, playerY)
      enemy(enemyX, enemyY)
      if bullet_state == &quot;fire&quot;:
          fire_bullet(playerX, bulletY)
          bulletY -= bulletY_change
  #detection of the keys pressed and consequences
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              pygame.quit()
              player(playerX, playerY)
      if event.type == pygame.KEYDOWN:
          if event.key == pygame.K_LEFT:
              playerX_change = -5
          if event.key == pygame.K_RIGHT:
              playerX_change = 5
          if event.key == pygame.K_SPACE:
              fire_bullet(bulletX,bulletY)
      if event.type == pygame.KEYUP:
          if event.key == pygame.K_LEFT or event.key == pygame.K_RIGHT:
              playerX_change = 0
  
  #player and enemy movement system
      playerX += playerX_change
      enemyX += enemyX_change
  
  
  #enemy and player collision detection
      if enemyX &lt;= 0:
          enemyX_change = 4
          enemyY += enemyY_change
      if enemyX&gt;= 736:
          enemyX_change = -4
          enemyY += enemyY_change
      if playerX &lt;= 0:
          playerX = 0
      if playerX &gt;= 736:
          playerX = 736
  #display update
  
      pygame.display.update()
  </code></pre>