title: creating random objects using pygame
body: <p>i am developing a game in python 3.3 using pygame.
  can i please have a code which can do the following : 
  create a screen of size say 800 * 800.
  On the screen rectangles of a fixed size of 30*30 appear from the right and move slowly towards the left. as soon as they collide with the left wall, they disappear. the rectangles should come at random heights and fixed speed.
  this is what i tried :</p>
  
  <pre><code>import pygame, sys
  from pygame.locals import *
  addrect = 0
  addrect_rate = 40
  rectangles = []
  while True:
      for r in rectangles:
          addrect += 1
          if addrect == addrect_rate:
              addect = 0
              newrect = {'rect': pygame.Rect(40, 40, 10, 10),
                         'speed': rect_speed,
                         'image': pygame.draw.rect((50, 50), 10, 10)
                        } 
      for r in rectangles:
          rectangles.append(newrect)
  </code></pre>
  
  <p>The basic approach is this. please help me complete the code by drawing the screen, and making this work.
  Thanks !</p>