title: I dont know what ive done wrong, , i have followed a guide, it could be a outdated software issue or something?
body: <p>Please someone figure out why I'm dumb and this no worky
  I've tried to change the main loop around e.g. removing some lines, idk
  I made the window random because I was bored
  the main issue I have is the window instantly opening then closing, I don't know why this happens, pls help :)</p>
  <pre><code>import pygame
  import random
  
  random1 = (random.randint(1, 2000))
  random2 = (random.randint(1,2000))
  width, height = random1, random2
  fps = 60
  red = (255, 0, 0)
  
  window = pygame.display.set_mode((width, height))
  pygame.display.set_caption(&quot;i don't know what im doing&quot;)
  
  man_character = pygame.image.load('mancharacter.jpg')
  
  
  def draw_window():
      window.fill(red)
      window.blit('mancharacter.jpg')
      window.blit('potato.PNG')
      pygame.display.update()
  
  def main():
      clock = pygame.time.Clock()
      pizza = True
      while pizza:
          clock.tick(fps)
          for event in pygame.event.get():
              if event.type == pygame.Quit():
                  pizza = False
          draw_window()
      pygame.Quit()
  </code></pre>