@@ -0,0 +1,615 @@
+import sys, pygame%0Apygame.init()%0A%0Asize = width, height = 320, 240%0Aspeed = %5B2, 2%5D%0Ablack = 0, 0, 0%0Awhite = 255, 255, 255%0A%0Ascreen = pygame.display.set_mode(size)%0A%0Aballrect = pygame.Rect(0, 0, 40, 40)%0A%0Awhile 1:%0A    for event in pygame.event.get():%0A        if event.type == pygame.QUIT: sys.exit()%0A%0A    ballrect = ballrect.move(speed)%0A    if ballrect.left %3C 0 or ballrect.right %3E width:%0A        speed%5B0%5D = -speed%5B0%5D%0A    if ballrect.top %3C 0 or ballrect.bottom %3E height:%0A        speed%5B1%5D = -speed%5B1%5D%0A%0A    screen.fill(black)%0A    pygame.draw.circle(screen, white, ballrect.center, ballrect.width/2)%0A    pygame.display.flip()

Add bouncing ball example