This is my first game and was wondering how I should get a user input to stop the program from running through, down at the bottom. When I run the bottom part of the program it goes so fast I can barely see it. After where the first pygame.display.update() is where my problem occurs.
[CODE]
bif="back.jpg"
mif="cursor.png"
tif="title.jpg"
rif="redrion.png"
lif="MainLogo.png"
btlgrdif="battleground.jpg"
gcif="greycoat.png"
bcif="bluecoat.png"
blt1if="bullet 1.png"
blt2if="bullet 2.png"
infoif="info.jpg"
unionvicif="unionvic.png"

import pygame, sys
from pygame.locals import *

pygame.init()
screen=pygame.display.set_mode((1152,648),0,32)
backround=pygame.image.load(bif).convert()
mouse_c=pygame.image.load(mif).convert_alpha()
title=pygame.image.load(tif).convert()
redrion=pygame.image.load(rif).convert()
logo=pygame.image.load(lif).convert()
btlgrd=pygame.image.load(btlgrdif).convert()
greyct=pygame.image.load(gcif).convert()
bluect=pygame.image.load(bcif).convert()
bulet1=pygame.image.load(blt1if).convert()
bulet2=pygame.image.load(blt2if).convert()
info=pygame.image.load(infoif).convert()
unionvic=pygame.image.load(unionvicif).convert()

a=120
b=1050
color2=(115,160,5)
color1=(0,0,0)
pos1=(500,150)
pos2=(1000,150)
color=(26,63,99)
rectangle=(40,30,400,600)

while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
screen.blit(backround, (0,0))
screen.blit(title, (500,130))
screen.blit(redrion, (950,600))
screen.blit(logo, (1120,620))
screen.lock()
pygame.draw.rect(screen, color, rectangle)
pygame.draw.line(screen, color1, pos1, pos2, 10)
screen.unlock()


x,y = pygame.mouse.get_pos()
x -= mouse_c.get_width()/2
y -= mouse_c.get_height()/2

screen.blit(mouse_c, (x,y))


pygame.display.update()

for event in pygame.event.get():
if event.type == KEYDOWN:
if event.key == K_g:
screen.blit(btlgrd, (0,0))
screen.blit(bluect, (30,441))
screen.blit(greyct, (1042,441))
screen.blit(bulet1, (a,502))
screen.blit(bulet2, (b,502))
a+=1
b-=1
if a>1050:
a=120
if b<120:
b=1050
screen.lock()
if event.key == K_r:
screen.blit(unionvic, (400,100))
if event.key == K_q:
screen.lock()
screen.unlock()

pygame.display.update()
[CODE]