title: My draw isn't working?
body: <p>I am trying to make a basic game and I was wondering why I kept getting an error when trying to draw my sprite? Any help would be gratefully appreciated.</p>
  
  <p>My Code:</p>
  
  <pre><code>import pygame
  import sys
  import time
  from time import sleep
  import random
  
  class sprite:
      def __init__(self):
          self.image = pygame.image.load(image1)
          self.x = 50
          self.y = 50
          self.image.fill(255, 255, 0)
  
      def background(self, surface):
          self.image2 = pygame.image.load(white.png)
          screen.blit(self.image2, (0,0))
  
      def draw(self, surface):
          screen.blit(self.image, (self.x, self.y))
  
  screen = pygame.display.set_mode((1250, 500))
  screen.fill((255,255,255))
  
  sprite=sprite
  
  while True:
      pygame.init()
      pygame.event.get()
      pygame.event.pump
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
             pygame.quit()
  
      sprite.draw(sprite)
  </code></pre>
  
  <p>My error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/camil/Desktop/Polar Bear/PB.py", line 43, in &lt;module&gt;
      sprite.draw(sprite)
  TypeError: draw() missing 1 required positional argument: 'surface'
  </code></pre>