title: Python: PyGame drawing RECTANGLE help(BEGINNER)
body: <p>I am just learning how to use <em>Pygame</em> but when I run the program the Pygame window is just black and there is no <strong>rectangle</strong>? Can anyone help?</p>
  
  <pre><code>         import pygame, sys
           from pygame.locals import *
  
           pygame.init()
           screen=pygame.display.set_mode((640,360),0,32)
  
  
  
           while True:
               for event in pygame.event.get():
                   if event.type==QUIT:
                       pygame.quit()
                       sys.exit()
  
           screen.lock()
           pygame.draw.rect (screen, (140,240,130), Rect((100,100), (130,170)))
           screen.unlock()   
  
  
  
  
           pygame.display.update()   
  </code></pre>